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 12-16-2008, 10:43 PM   #1 (permalink)
see my iOS apps! :D
 
Join Date: Sep 2008
Location: Europe
Posts: 280
Default Is it possible to Record and play at the same time?

Hi guys,

I am trying to use SpeakHere code to detect the audio input level at the mic. So, technically I am "recording" audio, despite the fact that I am not creating any file.

I need then to play some audio while I am "recording". But iPhone won't let me.

It seems that SpeakHere code locks the audio hardware and will not let it play unless I finish recording.

Is there any way to solve that?

any help will be appreciated. Thanks.
LunarMoon is offline   Reply With Quote
Old 12-17-2008, 02:32 AM   #2 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 59
Default

I also want solution of this problem
Thelordofring is offline   Reply With Quote
Old 02-26-2009, 02:51 PM   #3 (permalink)
New Member
 
Join Date: Feb 2009
Posts: 23
Default

Hello all, I'm looking for the same help. I've placed this code in my viewDidLoad: method

Code:
NSError *err;
buzzSoundPlayer = [[ AVAudioPlayeralloc] initWithContentsOfURL: 
            [NSURL fileURLWithPath: [[NSBundle mainBundle] pathForResource : @"buzz"  ofType: @"caf"inDirectory: @"/"]] error: &err];

buzzSoundPlayer.numberOfLoops = 3;
[buzzSoundPlayer prepareToPlay];

I've also added this as a variable in my ViewController.m file:

Code:
AVAudioPlayer     *buzzSoundPlayer;
and synthesized the setters and getters.

Now, once I have hit the record button in the application, any call like this:

Code:
[self.buzzSoundPlayer play];
plays the sound fine in the simulator, but is totally silent on the device. There are no error messages, it just doesn't play. Is there any way to get this working? Any help is greatly appreciated. Thanks.
gibson10ma is offline   Reply With Quote
Old 04-02-2009, 10:15 PM   #4 (permalink)
Registered Member
 
Join Date: Oct 2008
Posts: 6
Default

Anybody help ?
thekhanh1503 is offline   Reply With Quote
Old 04-04-2009, 05:46 AM   #5 (permalink)
New Member
 
Join Date: Mar 2009
Location: Chennai, India
Age: 27
Posts: 38
Default

Anybody please help regarding this issues.
__________________
Prabahar A
Prabahar is offline   Reply With Quote
Old 10-02-2009, 11:55 AM   #6 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 1
Default AVAudioSession is the answer

When you begin recording with AVAudioRecorder, the AVAudioSession category is set to AVAudioSessionCategoryRecord. To play sounds simultaneously you must manually set the category afterwards:

Code:
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];
slick is offline   Reply With Quote
Reply

Bookmarks

Tags
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: 329
21 members and 308 guests
@sandris, ADY, BrianSlick, dacapo, Dani77, Dattee, dre, HDshot, HemiMG, JasonR, MarkC, mer10, nibeck, prchn4christ, ryandb2, spiderguy84, themathminister, timle8n1, tomtom100, vogueestylee, vvenkatachallam
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,883
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, vvenkatachallam
Powered by vBadvanced CMPS v3.1.0

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