sound

Python Sound ("Bell")

I'd like to have a python program alert me when it has completed its task by making a beep noise. Currently, I use import os and then use a command line speech program to say "Process complete." I much rather it be a simple "bell." I know that there's a function that can be used in Cocoa apps, NSBeep, but I don't think that has much ...

How can I play sound in Java?

I want to be able to play sound files in my program. Where should I look? ...

How can I play compressed sound files in C# in a portable way?

Is there a portable, not patent-restricted way to play compressed sound files in C# / .Net? I want to play short "jingle" sounds on various events occuring in the program. System.Media.SoundPlayer can handle only WAV, but those are typically to big to embed in a downloadable apllication. MP3 is protected with patents, so even if there w...

How to detect the presence of a default recording device in the system?

How do I detect if the system has a default recording device installed? I bet this can be done through some calls to the Win32 API, anyone has any experience with this? I'm talking about doing this through code, not by opening the control panel and taking a look under sound options. ...

Mute Specific Application in Vista

I am in need of a way to mute a specific application in Vista. Example: Mute just Firefox, but not all of the other application. Much similar to muting a specific program from within the volume mixer in vista. If there is a program that will do this, i would appreciate that. Otherwise if there is a way to do this, I will write a sma...

is it possible to detect if a flash movie also contains (plays) sound?

Is there a way to detect if a flash movie contains any sound or is playing any music? It would be nice if this could be done inside a webbrowser (actionscript from another flash object, javascript,..) and could be done before the flash movie starts playing. However, I have my doubts this will be possible altogether, so any other (progra...

iPhone App Crashing - Error Question

I'm writing my first iPhone app, so I haven't gotten around to figuring out much in the way of debugging. Essentially my app displays an image and when touched plays a short sound. When compiling and building the project in XCode, everything builds successfully, but when the app is run in the iPhone simulator, it crashes. I get the foll...

How to play a standard windows sound?

How do I find out which sound files the user has configured in the control panel? Example: I want to play the sound for "Device connected". Which API can be used to query the control panel sound settings? I see that there are some custom entries made by third party programs in the control panel dialog, so there has to be a way for the...

producing 2 or more short sounds when a web page loads.

I have 6 sound files (1.wav 2.wav etc..) of which 3 different ones have to be heard each time the web page opens. The numbers are selected randomly. I have tried multiple "embeds" but only the last sound selected gets produced. I have also tried javascript routines that fiddle the bgsound attribute, however, I was not able to produce mor...

SoundPlayer crash on Vista

The following code is causing an intermittent crash on a Vista machine. using (SoundPlayer myPlayer = new SoundPlayer(Properties.Resources.BEEPPURE)) myPlayer.Play(); I highly suspect it is this code because the prgram crashes mid-beep or just before the beep is played every time. I have top-level traps for all ThreadExceptions,...

Why do some wav files play in my c# directsound app but some don't?

Hi, I've got a c# application that plays simple wav files through directsound. With the test data I had, the code worked fine. However when I used real-world data, it produced a very unhelpful error on creation of the secondary buffer: "ArgumentException: Value does not fall within the expected range." The test wavs had a 512kbps bit...

How to play a sound in Actionscript 3 that is not in the same directory as the SWF?

I have a project with a bunch of external sounds to a SWF. I want to play them, but any time I attempt load a new URL into the sound object it fails with either "Error #2068: Invalid Sound" or raises an ioError with "Error #2032 Stream Error". // Tried with path prefixed with "http://.." "file://.." "//.." and "..") var path:String = ...

java sound without hardware device

Hello, Anyone know if it is possible to write an app that uses the Java Sound API on a system that doesn't actually have a hardware sound device? I have some code I've written based on the API that manipulates some audio and plays the result but I am now trying to run this in a server environment, where the audio will be recorded to a ...

How to play a sound file

With C#, How do I play (Pause, Forward...) a sound file (mp3, ogg) ? The file could be on the hard disk, or on the internet. Is there any library or Class out there that can ease me the work ? Thanks ...

ubuntu trouble with SDL

I'm trying to learn to use SDL for a little game I'm writing , but I have a problem . One single application can play sound at a given time on my system . If for example I have amarok or kaffeine ( or even firefox while playing a flash video ) , no other application can play sound . The only solution I've found is to run just an applicat...

What is the best way to store media files on a database?

I want to store a large number of sound files in a database, but I don't know if it is a good practice. I would like to know the pros and cons of doing it in this way. I also thought on the possibility to have "links" to those files, but maybe this will carry more problems than solutions. Any experience in this direction will be welcome...

Is DirectSound the best audio abstraction layer for Windows?

Is DirectSound the best audio abstraction layer for Windows? Switching my app from a very bad sound implementation, built to a specific chipset, to an abstration layer. App is native Winform, .net 3.5. DirectX/DirectSound is the likely choice, but a little concerned about the overhead. Any other options? Or is it silly to even THINK ...

Cross-platform, cross-browser way to play sound from Javascript?

I am writing a dhtml application that creates an interactive simulation of a system. The data for the simulation is generated from another tool, and there is already a very large amount of legacy data. Some steps in the simulation require that we play "voice-over" clips of audio. I've been unable to find an easy way to accomplish this ...

Check if SoundChannel is playing sound

How to check reliably if a SoundChannel is still playing a sound? For example, [Embed(source="song.mp3")] var Song: Class; var s: Song = new Song(); var ch: SoundChannel = s.play(); // how to check if ch is playing? ...

The best way of storing an image/sound inside a class?

I'm developing a kind of an exchange format between instances of an application so that user could save information to file and restore it later. The whole 'exchange format' is a single class that gets serialized and written to disk. How would you suggest to store graphical/sound information inside that class? I'd like to avoid just put...