Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-12-2009, 11:50 PM   #1 (permalink)
New Member
 
Join Date: Dec 2008
Location: Shanghai, China
Posts: 5
Exclamation Play no sound after Record in Device using SpeakHere, but ok in simulator

Hi guys,

My app is recording mic input as a wav file using AudioQueue code in SpeakHere, and play it after the record finished. The problem is that in simulator the sound file could be played successfully after record, but when running in device, when play the sound file after record, there is no sound, even I play another file not record file, and there is no error message when I debug. I must exit the app, and launch it again, then the last time's record file could be played with sound.
It seems the record process blocked the output of sound, but why in simulator it could work and no work in device?

Any suggestion is appreciated.
Thanks.
ZJquery is offline   Reply With Quote
Old 01-13-2009, 08:40 PM   #2 (permalink)
New Member
 
Join Date: Dec 2008
Location: Shanghai, China
Posts: 5
Default

I found it could play using AudioSession as SpeakHere, but it won't play sound using SystemSound or OpenAL or SoundEngine.
Do you have any suggestion?
ZJquery is offline   Reply With Quote
Old 01-14-2009, 10:40 AM   #3 (permalink)
New Member
 
Join Date: Dec 2008
Location: Shanghai, China
Posts: 5
Default

The record functions is used SpeakHere's AudioSession and AudioQueue code, and the play part cannot play sound using SystemSound and OpenAL and SoundEngine except using AudioSession as SpeakHere did.
The two scenario are following:
1. Enter the app, record a new file, it could play sound. Record again, there is no sound play.
2. Or enter the app, play a sound of former record file, then record a new file, after that there is no sound play.

Does any one has some experience of this problem?
ZJquery is offline   Reply With Quote
Old 04-20-2009, 05:23 PM   #4 (permalink)
New Member
 
Join Date: Mar 2009
Posts: 3
Default

Did you ever figure out the answer? I'm having the same problem. If I record a sound using Audio Queues, then try to play it back using OpenAL, it works in simulator, but I get no sound on the device, and the playback never appears to complete (AL_PLAYING always returned). I've set breakpoints and the soundfile appears to load properly, looks like there's valid data, no errors on anything.

Also note that the sound plays back using Audio Queues just fine, and if I exit the app and then re-launch, the sound plays in OpenAL as well. But as soon as I record another sound, OpenAL playback stops working again.

Any ideas greatly appreciated

Last edited by grimmdp; 04-20-2009 at 05:25 PM.
grimmdp is offline   Reply With Quote
Old 04-20-2009, 08:38 PM   #5 (permalink)
Registered Member
 
rayhklee's Avatar
 
Join Date: Oct 2008
Location: Hong Kong
Posts: 27
Default

If you don't need the UVMeter, and your target OS is 2.2.1, then I suggest you to use AVAudioPlayer.
rayhklee is offline   Reply With Quote
Old 04-20-2009, 09:58 PM   #6 (permalink)
New Member
 
Join Date: Mar 2009
Posts: 3
Default

Quote:
Originally Posted by rayhklee View Post
If you don't need the UVMeter, and your target OS is 2.2.1, then I suggest you to use AVAudioPlayer.
Thanks for replying. Problem is, I'm using OpenAL to alter the pitch during playback, so I kinda have to stick with OpenAL, unless I implement my own FFT, which I'm trying to avoid. And unfortunately, it looks like iPhone doesn't support OpenAL Capture, so I have to use Audio Queues to record.
grimmdp is offline   Reply With Quote
Old 04-20-2009, 10:00 PM   #7 (permalink)
New Member
 
Join Date: Dec 2008
Location: Shanghai, China
Posts: 5
Default

Quote:
Originally Posted by rayhklee View Post
If you don't need the UVMeter, and your target OS is 2.2.1, then I suggest you to use AVAudioPlayer.
Not fortunately, my app's target OS is 2.0, so I can't use AVAudioPlayer. Thanks for your reply.
I solved the problem by add a callback based on AudioQueue's Player example, in which I set a count to check loop playing of the sound file.
ZJquery is offline   Reply With Quote
Reply

Bookmarks

Tags
device sound, recording, speakhere

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 277
24 members and 253 guests
ADY, AragornSG, Bertrand21, Dani77, Dattee, fkmtc, HDshot, HemiMG, iDifferent, jakerocheleau, JasonR, jimbo, macquitzon216, mer10, NSeven, prchn4christ, Rudy, sacha1996, silverwiz, sneaky, spiderguy84, Sunny46, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,767
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:07 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0