audio

How to switch between speaker and headphones in iPhone application

I've written an app that plays audio using AVAudioPlayer. I've implemented a function that switches the audio to the speaker: UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback; AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory), &sessionCategory); UInt32 audioRouteOverride = kAudioSessio...

Android set speakerphone on programmatically

Hi, I am trying to set speakerphone on in a call programmatically using audiomanager.setSpeakerphoneOn(true) in a service but it seems it is not working and I don't know why. Should I do something else? Thanks ...

Alternate play / pause button for WordPress wpaudio soundmanager plugin

Hello! I am using the wpaudio plugin to convert mp3 links into a javascript/flash audio player. My problem is that I use this plugin in two areas on my site: one on a black background, and one on a white background. I need to use an alternate set of play/pause buttons for each page (white buttons for the black background and vice versa)...

Stop method not working

Hi everyone , can anybody tell me why the following code doesn't work properly? I want to play and stop an audio file. I can do the playback but whenever I click the stop button nothing happens. Here's the code : Thank you. .................. import java.io.*; import javax.sound.sampled.*; import javax.swing.*; import java.awt.event....

What's the best way of playing media files (esp. audio) with Mono/C#?

I'm trying to create something that will be playing some sound and music for some things in Mono+C#, but I'm not sure what the best thing will be for that. I'm trying to make it usable with things like Ogg Vorbis, MP3s, and wave files. My primary platform will be Linux, although a cross platform solution would be nice. Anyone have any...

VU meter implementation in iphone

I am developing an aplication for iPhone which records audio and saves that audio file. I need to create a UI similar to that in Voice Memo app with a VU meter. I implemented code to record audio, but I have no idea about VU meter implementation. Looking forward to a reply. Thanks in advance. ...

C# XP Sound QuickFix

I have this: ThreadPool.QueueUserWorkItem(new WaitCallback(FireAttackProc), fireResult); and FireAttackProc: private void FireAttackProc(Object stateInfo) { // Process Attack/Fire (local) lock (_procLock) { // build status message String status = "(Away vs. Home)"; ...

Detect and record a sound with python

I'm using this program to record a sound in python: http://stackoverflow.com/questions/892199/detect-record-audio-in-python/892293#892293 I want to change the program to start recording when sound is detected by the sound card input. Probably should compare the input sound level in chunk, but how do this? ...

Converting mp3 to caf file for iPhone

Hi, I am experimenting with the sampling rate of the mp3 file to convert it into caf format. afconvert -f caff -d LEI16@44100 ./fricatives_play_all.mp3 ./test.caf afconvert -f caff -d LEI16@22100 ./fricatives_play_all.mp3 ./test.caf afconvert -f caff -d LEI16@12000 ./fricatives_play_all.mp3 ./test.caf afconvert -f caff -d LEI16@2010...

AS3 Audio Effects

I want to apply some effects to a sound but I couldn't find one library which has all these effects. Do you know any? Effects are: Phaser Delay Distortion Cut Filter ...

audio processing using java

We have a requirement where we need to convert from .wav file to .mp3 and we are currently using "Tritonus" library to do that . The concern with that library is that requires "installation" of some "dll" files to the class path. I am wondering are there any API's those allow better processing without local installation. And other ques...

Doing a loop on android (Audio)

I have a track I want to play 'megadeth', i'm calling it by... final MediaPlayer mp = MediaPlayer.create(this, R.raw.megadeth); And playing it by using 'mp.start' And I just want to know, how can I get this audio mp3 to loop? -Can you give me the code? Thanks alot, ...

iPhone, JQTouch and HTML5 audio tags

I am having an issue with JQTouch (latest beta) and html5 audio tags on 'sub pages' - the audio tag works before any page transitions are done, and cease to work afterward. For example: http://richardprice.dyndns.ws/test.html and http://richardprice.dyndns.ws/test2.html are identical other than I swap the "current" class between the...

amplitude per sample iphone Audio

Summary: how do i get the amplitude of each sample using the default aurioTouch code. in Depth: The aurioTouch seems to be setup well for what i need, i need to be sampling at 44.1Khz and then taking the amplitude values from these and applying a small filter i have written to detect an event. I know this should go in the PerformThru ca...

Writing an audio player in C#

Hi, I have a pretty cool idea for a very special media player. I like to think about this project as a mini-startup, since I don't yet know if my idea is practical. Anyways, before implementing my idea, I first need to be able to implement a simple audio player. My preferred language for this project is C#, simply because it's so easy ...

Html5 Audio plays only once in my Javascript code.

I have a dashboard web-app that I want to play an alert sound if its having problems connecting. The site's ajax code will poll for data and throttle down its refresh rate if it can't connect. Once the server comes back up, the site will continue working. In the mean time I would like a sound to play each time it can't connect (so I ...

how to get audio frequency data from a wave file?

I want to build a speech recognition engine in ruby. I know i'll never get there, doing it just for fun. I need to get data for the frequencies of the sound stored in a wav file to compare with data i already have of different sounds that i want to recognize. I will write the code in ruby but i dont think there are any libraries for thi...

Difficulty porting raw PCM output code from Java to Android AudioTrack API.

I'm attempting to port an application that plays chiptunes (NSF, SPC, etc) music files from Java SE to Android. The Android API seems to lack the javax multimedia classes that this application uses to output raw PCM audio. The closest analog I've found in the API is AudioTrack and so I've been wrestling with that. However, when I try to...

flash.media.Sound.play takes long time to return

I'm trying to play some sounds in my flash project through action script. However for some reason in my code the call to Sound.play takes from 40ms to over 100ms in extreme cases, which is obviously more than enough to be very noticeable whenever a sound is played. This happens every time a sound is played, not just when that sound is fi...

how to get the css keys and values for any html tag

I would like to dump all css key/value pairs for an html tag. In particular, I would like to learn the css properties for <audio> tag, so I can try to customize the look. document.getElementById('myaudio').style returns a CSSStyleDeclaration object but length returns 0 and I cannot figure out to iterate over the key/value pairs. Thank ...