IPod playback + microphone record at the same time?

Hey,
I'm making an app that requires music to be playing at the same time as the app is recording audio through the microphone.
Specifically, I need a volume reading from the microphone to be calculated constantly (30 times a second or so) at the same time as music is playing through the iPod app.
I also need to be able to set the volume of the music automatically from my code (ie not by the user using a slider)
I am currently using MPVolumeView to set the volume and AVAudioRecorder to record the microphone volume.
Problems with this:
MPVolumeView only allows change of volume by user interaction (AFAIK?), not by the code setting it automatically.
Also, iOS doesn't seem to like both running at the same time... If music isn't playing, I get a readout from AVAudioRecorder of the sound its picking up but no volume slider, if the iPod is playing, I get the MPVolumeView slider, but the microphone readout does not work.
Please help me out?
I know this is possible, apps like IAmTPain do both tasks simultaneously (although the volume of the playback is not automatically variated).
Thanks for any replies! :P

Hello!
Try to use the cloner directly for the player. It seems that all clones need a cloneableableDataSource, which is working on a player or processor:
DataSource cloner;
DataSource forPlay;
DataSource forSave;
//...get data source from the receive stream
dsource = stream.getDataSource();
cloner = Manager.createCloneableDataSource( dsource );// forPlay = ((SourceCloneable)cloner).createClone();
player = Manager.createPlayer( cloner );
//when do recording
forSave = ((SourceCloneable)cloner).createClone();
Processor p = Manager.createProcessor(forSave);

Similar Messages

  • Logic 10.0.07 keeps stopping recording at the same time every time

    Logic 10.0.07 keeps stopping recording at the same time every time 3.14!
    How can i get it to extend on recording time?
    Model Name: Mac Pro
      Model Identifier: MacPro6,1
      Processor Name: 6-Core Intel Xeon E5
      Processor Speed: 3.5 GHz
      Number of Processors: 1
      Total Number of Cores: 6
      L2 Cache (per Core): 256 KB
      L3 Cache: 12 MB
      Memory: 32 GB
      L3 Cache: 12 MB
      Memory: 32 GB
    Model Name:
      L3 Cache: 12 MB
      Memory: 32 GB
    Model Name: Mac Pro
      Model Identifier: Mac
      L2 Cache (per Core): 25
    Model Name: Mac Pro
      Model Identifier: MacPro
      L3 Cache: 12 MB
      Memory: 32
      L3 Cache: 12 MB
      Memory: 32 GB

    Do you have auto drop enabled? Look for a red bar at the top where the green cycle bar is. It will punch you out at the end of the red bar.

  • Reading and recording at the same time with AudioUnit

    Hi,
    I am trying to read and record at the same time on the iPhone with AudioUnit. For the reading part I made an AUGraph which works fine, constructed like that:
    NewAUGraph(&_graph);
    _outputUnitComponentDescription.componentType = kAudioUnitType_Output;
    _outputUnitComponentDescription.componentSubType = kAudioUnitSubType_RemoteIO;
    _outputUnitComponentDescription.componentManufacturer = kAudioUnitManufacturer_Apple;
    _outputUnitComponentDescription.componentFlags = 0;
    _outputUnitComponentDescription.componentFlagsMask = 0;
    AUGraphAddNode(_graph, &_outputUnitComponentDescription, &_outputNode);
    _mixerUnitComponentDescription.componentType = kAudioUnitType_Mixer;
    _mixerUnitComponentDescription.componentSubType = kAudioUnitSubType_MultiChannelMixer;
    _mixerUnitComponentDescription.componentManufacturer = kAudioUnitManufacturer_Apple;
    _mixerUnitComponentDescription.componentFlags = 0;
    _mixerUnitComponentDescription.componentFlagsMask = 0;
    AUGraphAddNode(_graph, &_mixerUnitComponentDescription, &_mixerNode);
    AUGraphConnectNodeInput(_graph, _mixerNode, 0, _outputNode, 0);
    AUGraphOpen(_graph);
    AUGraphNodeInfo(_graph, _outputNode, NULL, &_outputUnit);
    AUGraphNodeInfo(_graph, _mixerNode, NULL, &_mixerUnit);
    _generatorUnitComponentDescription.componentType = kAudioUnitType_MusicDevice;
    _generatorUnitComponentDescription.componentSubType = kAudioUnitSubType_RemoteIO;
    _generatorUnitComponentDescription.componentManufacturer = kAudioUnitManufacturer_Apple;
    _generatorUnitComponentDescription.componentFlags = 0;
    _generatorUnitComponentDescription.componentFlagsMask = 0;
    for(int i=0; i< [_urlList count]; i++)
    SoundBuffer* soundBufferTemp = [_bufferSoundList objectAtIndex:i];
    AURenderCallbackStruct renderCallbackStruct;
    renderCallbackStruct.inputProc = MyFileRenderCallback;
    renderCallbackStruct.inputProcRefCon = soundBufferTemp;
    AudioStreamBasicDescription* inputAsbd = [soundBufferTemp getASBD];
    err = AudioUnitSetProperty(_mixerUnit,
    kAudioUnitProperty_StreamFormat,
    kAudioUnitScope_Input,
    i,
    inputAsbd,
    sizeof(AudioStreamBasicDescription));
    UInt32 zero = 0;
    err = AudioUnitSetProperty(_mixerUnit,
    kAudioOutputUnitProperty_EnableIO,
    kAudioUnitScope_Input,
    kInputBus,
    &zero,
    sizeof(zero));
    err = AUGraphSetNodeInputCallback(_graph,
    _mixerNode,
    i,
    &renderCallbackStruct);
    This works well, for the recording AudioUnit I did the following:
    OSStatus err;
    AudioComponentDescription audioComponentDescription;
    AudioComponent audioComponent;
    audioComponentDescription.componentType = kAudioUnitType_Output;
    audioComponentDescription.componentSubType = kAudioUnitSubType_RemoteIO;
    audioComponentDescription.componentManufacturer = kAudioUnitManufacturer_Apple;
    audioComponentDescription.componentFlags = 0;
    audioComponentDescription.componentFlagsMask = 0;
    audioComponent = AudioComponentFindNext(NULL, &audioComponentDescription);
    err = AudioComponentInstanceNew(audioComponent, &_audioUnit);
    UInt32 size;
    size = sizeof(AudioStreamBasicDescription);
    err = AudioUnitGetProperty(_audioUnit,
    kAudioUnitProperty_StreamFormat,
    kAudioUnitScope_Input,
    1,
    &_soundFileDataFormat,
    &size);
    _soundFileDataFormat.mSampleRate = 44100.00;
    AudioUnitSetProperty(_audioUnit,
    kAudioUnitProperty_StreamFormat,
    kAudioUnitScope_Input,
    kInputBus,
    &_soundFileDataFormat,
    size);
    AudioUnitSetProperty(_audioUnit,
    kAudioUnitProperty_StreamFormat,
    kAudioUnitScope_Output,
    kOutputBus,
    &_soundFileDataFormat,
    size);
    AURenderCallbackStruct renderCallbackStruct;
    renderCallbackStruct.inputProc = MyRecorderCallback;
    renderCallbackStruct.inputProcRefCon = self;
    UInt32 one = 1;
    UInt32 zero = 0;
    err = AudioUnitSetProperty(_audioUnit,
    kAudioOutputUnitProperty_EnableIO,
    kAudioUnitScope_Input,
    kInputBus,
    &one,
    sizeof(one));
    err = AudioUnitSetProperty(_audioUnit,
    kAudioOutputUnitProperty_EnableIO,
    kAudioUnitScope_Output,
    kOutputBus,
    &zero,
    sizeof(zero));
    err = AudioUnitSetProperty (_audioUnit,
    kAudioOutputUnitProperty_SetInputCallback,
    kAudioUnitScope_Global,
    0,
    &renderCallbackStruct,
    sizeof(AURenderCallbackStruct));
    err = AudioUnitInitialize(_audioUnit);
    Then in I setup a file to write in:
    - (void) openFile
    OSStatus err;
    err = ExtAudioFileCreateWithURL((CFURLRef) _soundFileUrl,
    kAudioFileCAFType,
    &_soundFileDataFormat,
    NULL,
    kAudioFileFlags_EraseFile,
    &_extAudioFileRef);
    err = ExtAudioFileSetProperty(_extAudioFileRef,
    kExtAudioFileProperty_ClientDataFormat,
    sizeof(AudioStreamBasicDescription),
    &_soundFileDataFormat);
    err = ExtAudioFileWriteAsync(_extAudioFileRef,
    0,
    NULL);
    All this things works well (I check by printing err in the log which I removed here for clarity).
    And then in the callback for recording I do the following:
    static OSStatus MyRecorderCallback(void *inRefCon,
    AudioUnitRenderActionFlags* inActionFlags,
    const AudioTimeStamp* inTimeStamp,
    UInt32 inBusNumber,
    UInt32 inNumFrames,
    AudioBufferList* ioData)
    OSStatus err= noErr;
    AudioUnitRecorder* auRec = (AudioUnitRecorder*) inRefCon;
    [auRec allocateAudioBufferList:1 size:inNumFrames*4];
    err = AudioUnitRender(auRec.audioUnit,
    inActionFlags,
    inTimeStamp,
    inBusNumber,
    inNumFrames,
    auRec.audioBufferList);
    err = ExtAudioFileWriteAsync(auRec.extAudioFileRef,
    inNumFrames,
    auRec.audioBufferList);
    return err;
    (Then I close the file after recording at the same time I close the AudioUnit)
    Now the strange thing is that all this works perfectly well in the simulator: I can record and play at the same time but on the device, the callback for recording is not ran (I check by trying to print something in the log in the callback function.) which men no writing in the file and an empty file in the end.
    Any one has any idea of what could be causing this?
    Thanks
    Alexandre

    Just in case some one might need it, I solved my problem:
    I simply needed to initialize the AudioSession before playing/recording. I did so with the following code:
    OSStatus err;
    AudioSessionInitialize(NULL, NULL, MyInterruptionListener, self);
    UInt32 sessionCategory = kAudioSessionCategory_PlayAndRecord;
    err = AudioSessionSetProperty (kAudioSessionProperty_AudioCategory,
    sizeof (sessionCategory),
    &sessionCategory);
    AudioSessionSetActive(TRUE);

  • I want to disable "restore previous session" and enable "History record" at the same time.

    I want to disable "restore previous session" and enable "History record" at the same time.
    Because I don't want others to access my account such as "Gmail", "Facebook". But I want firefox to record my browsing history.
    What should I do?

    I managed to remove the "Restore Previous Session" button from the home page by changing my default home page with this : www.google.com/firefox/ (the default home page from the previous versions of Firefox). It worked for me, I hope it works for you too.

  • 16 channels of audio recording at the same time with a MAC BOOK?

    Hi,
    I want to know how many channels of audio I can record at the same-time with a MAC BOOK (2.16GHz Intel Core 2 Duo, 1GB memory 120GB hard drive, Double-layer SuperDrive), firewire audio device and Logic Pro 8?
    You see I am aiming to record a live gig and I want to come into a firewire recording interface with 16 channels of audio all at the same time (24-bit, 44Khz) Does anyone know if this is possible? Or am I looking for trouble? No plug-ins will be used just record straight in. Anyone have some experience with this?
    Thanks.

    Ok, like this:
    Macbook - FW Port - FW Cable -In- MOTU Traveler -Out- External Harddrive.
    Firewire is capable of chaining units.
    Also plugged into your motu traveler will be an optical cable coming from the ADA.
    This will carry the 8 channels of audio it outputs.
    Also another good thing to do is to also have an optical cable FROM the optical output of your Traveler into the Behringer's input.
    That way you can sync the Behringer's digital clock to that of the Traveler, giving you a slightly better sounding signal that if you were to sync the traveler to the Behringer. This is simply because the traveler has a better quality digital clock than the Behringer unit so it's best to use that. To do this you just select "Adat input" on the back of the Behringer, and leave the Travelers sync to "Internal Clock". It is only a very very slight difference and you may not be able to notice the difference but for the cost of an optical cable it's worth doing.
    It will all make a lot more sense when you have the two units and the harddrive all plugged in.

  • Am trying to record a basic guitar track while I sing along.  I don't want my vocals to be recorded at the same time but the internal mic seems to be picking up the vocal and guitar sounds.  I tried System Preferences, Sound, Line In - Audio Line Input.

    I am trying to record a basic guitar track while I sing along.  I don't want my vocals to be recorded at the same time but the internal mic seems to be picking up the vocal and guitar sounds.  I tried System Preferences, Sound, Line In - Audio Line Input.  It seems to be a common problem in Garageband for the Mac, ipad and iphone. 

    for me it turned out that the jack into the iMac was loose.  Once I fiddled with it everything worked okay

  • I am using the PCI-6110E/​6111E with the NI-DAQ software version6.7​.Is there a way to record at the same time analog and digital channels?I​f,ye

    s can I have timestamps for each sample?I mean,is there a notion of time information on this board?Finally,is there a way to know ,in the double buffer's case,the number of samples in the halfbuffer which is not full if the acquisition stops by a trigger?.I am using the PCI-6110E/6111E with the NI-DAQ software version6.7.Is there a way to record at the same time analog and digital channels?If,yes can I have timestamps for each sample?I mean,is there a notion of time information on this board?Finally,is there a way to know ,in the double buffer's case,the number of samples in the halfbuffer which is not full if the acquisition
    stops by a trigger?.
    Thank you for your interest in advance

    s can I have timestamps for each sample?I mean,is there a notion of time information on this board?Finally,is there a way to know ,in the double buffer's case,the number of samples in the halfbuffer which is not full if the acquisition stops by a trigger?.PALE wrote:
    >
    > I am using the PCI-6110E/6111E with the NI-DAQ software version6.7.Is
    > there a way to record at the same time analog and digital
    > channels?If,yes can I have timestamps for each sample?I mean,is there
    > a notion of time information on this board?Finally,is there a way to
    > know ,in the double buffer's case,the number of samples in the
    > halfbuffer which is not full if the acquisition stops by a trigger?.
    Start by looking around the examples that ship with LabVIEW (if you are
    using LabVIEW).
    Also look around zone.ni.com for general data acquisition information &
    examples. A good site.
    Mark

  • Go to detail page and update record at the same time

    Hi guys,
    I`m very new to dreamweaver and have no coding skills, so
    please be gentle.
    I`m have created a mail box and it all works fine, the
    problem i`m having is that I want to be able to tag wether a
    message has been read or not.
    So the subject has to be a link so when someone clicks the
    subject you are redirected to the read message page and it displays
    the message in full.
    My question is there a way to go to detail page and update
    record at the same time?
    I`m using ASP and the mysql read or not field is a SET

    "mrmidjam" <[email protected]> wrote in
    message
    news:fghrpf$7s2$[email protected]..
    > Hi guys,
    >
    > I`m very new to dreamweaver and have no coding skills,
    so please be
    > gentle.
    >
    > I`m have created a mail box and it all works fine, the
    problem i`m having
    > is
    > that I want to be able to tag wether a message has been
    read or not.
    >
    > So the subject has to be a link so when someone clicks
    the subject you are
    > redirected to the read message page and it displays the
    message in full.
    >
    > My question is there a way to go to detail page and
    update record at the
    > same
    > time?
    You can use the Update Record ZerverBehavrior and then have
    it redirect to
    the detailpage.
    Joris

  • Can't watch a programme and record at the same time.

    I rang Sky who say it's nothing to do with them. Gave me Lovedigital number. Rang them they said contact my landlord. Rang Bristol City Council, they say it's nothing to do with them.

    What I meant is the number of cables going into your Sky box. If there is only one cable going to your Sky box, that answers the question of why you can't watch one thing and record another at the same time - your Sky + box would require two inputs to do that. From what you've said it sounds like a communal dish set up. If that is right then whoever looks after that are the people you need to contact to see about the possibility of getting a double feed into your home. 

  • Streaming Live and Recording at the same time

    Currently I allow users to stream live Audio and Video and I would like to begin recording the Audio/Video at the same time.
    The only way I can figure out streaming Live and Recording is to create two NetStreams and connect with the same NetConnection and have one netstream publish "live" and the other netstream publish "record". This just doesn't seem very efficient because it would be streaming the same thing twice to the FMS.
    Is this the only way to go about this? or am I going the wrong way with this?

    What you want to do is record to FMS.  Then use NetStream.Play(filename, -1) to only play live.

  • How to record at the same time broadcast an internet tv show?

    I do an internet tv show on stickam.com and I use the flash
    live camera feed to broadcast. The website has a way to record the
    video ....but I would like to record to my hard drive. Is there a
    way to do that?
    Thanks,
    John

    well, cygwin will not be able to "zip" at the same time, nor will unix does.
    this is because "zip" can not be written/read sequentially, as gzip/compress could
    if you use tar+compress, you could do that with pipes. I tried and it seems cygwin can do pipes (I did not know). but
    mknod mypipe p
    gzip <mypipe >dmp.z &
    exp file=mypipe did not work as it would in unix
    Message was edited by:
    Laurent Schneider
    well, maybe zip could work on unix. I just remind zip/unzip as basically not working thru pipes. But under certain circumstances, it may work...

  • Playback and save at the same time?

    I am using following code to try to play media and save it at the same time,but when recording starts,the player stops,and recording doesn't succeed.when I appointed a name such as abc.mov,it produces two files: abc.mov(0kb) and the other
    abc.nonstreamable.mov whose size appears to be growing continuously,but at last cannot be opened using any tools.
    Who has some solutions?Thanks in advance!
    DataSource cloner;
    DataSource forPlay;
    DataSource forSave;
    //...get data source from the receive stream
    dsource = stream.getDataSource();
    cloner = Manager.createCloneableDataSource( dsource );
    forPlay = ((SourceCloneable)cloner).createClone();
    player = Manager.createPlayer( forPlay );
    //when do recording
    forSave = ((SourceCloneable)cloner).createClone();
    Processor p = Manager.createProcessor(forSave);

    Hello!
    Try to use the cloner directly for the player. It seems that all clones need a cloneableableDataSource, which is working on a player or processor:
    DataSource cloner;
    DataSource forPlay;
    DataSource forSave;
    //...get data source from the receive stream
    dsource = stream.getDataSource();
    cloner = Manager.createCloneableDataSource( dsource );// forPlay = ((SourceCloneable)cloner).createClone();
    player = Manager.createPlayer( cloner );
    //when do recording
    forSave = ((SourceCloneable)cloner).createClone();
    Processor p = Manager.createProcessor(forSave);

  • Insert multiple records at the same time to table

    hi,
    My page has,
    1. MessageStyledBean showing a foreign key(say FID) that is passed from previous page.
    2. Advanced table, showing 2 poplist in each of its column, named poplist1 and poplist2.
    3. I have a primary key which should be populated in sequence, i am not displaying it anywhere inthe page(is this right and fine).
    4. I have 'Add another row' button in my advanced table.
    5. I have apply submit button at the bottom of my page.
    So for the same FID at the same time, a user can add multiple rows of poplist1 and poplist2 values using Add another row. Once the user clicks Apply, say after he assigns 2 rows to the same FID in the same page at same time, 2 rows with same FID, different primary ID(in seq), with selected poplist values should be added in the database table.
    I have no clue of how to do this. Pls sombody help me out in doing this.
    Thanking you
    ri

    1. In EOImpl, you can override create(AttributeList nameValuePair) method and set the primary key and FID value.
    This will be called for each row creation.
    you can do
    getOADBTransaction() .getSequenceValue(String pSequenceName)
    to get teh sequence in EO.
    Hope it helps.
    Cheerz,
    Rathna

  • How can I read and display data with OR without recording at the same time?

    Hi all,
      This forum has been of much help to me, but I have a rather specific question I can't seem to find an answer to.  I am new to LabView, educating myself with tutorials, trial and error, and this forum. 
      Attached is what I have so far.  I would like to read data (three voltages) and write it to an excel file.  As written below, it will do nothing until I click the "Record" button, when it then takes data, displays it on the gauges and waveform chart, and writes it to a file.  What I would like it to do is display the data at all times, and record when I click the record button (while still displaying data being read).  I have tried to do this by moving the DAQ Assistant VI, gauges, and waveform graph outside of the loops, but when I do this, it will read until I press record, and then it simply records whatever value it's stuck on.  Sorry for the long post, thanks for any help. 
      --Nathan
    Attachments:
    Record and Write to File 2.vi ‏332 KB

    Sorry, I don't have any DAQ installed, so I won't comment on the DAQ parts.
    First of all, Your VI will do nothing until you (1) first set the record button to ON  and (2) press the start button in the tool bar. It almost seems that you are using the "continuous run" button. (Don't! That's not its purpose. Basically, it automatically restarts the program whenever it finishes). A toplevel VI should never stop during normal operation, so place a big while loop around all code and create a wait state that does nothing until you tell it to acquire.
    You don't need the inner while loop, simply place your code inside the big while loop (and accumulate your array data in an initialized shift register if really needed. Currently you do at the inner loop boundary for some reason). You have a big problem that the array can grow without bounds unless you clear the accumulated data once in a while or place it in a FIFO buffer of limited size. If you let ot grow forever like you do now, the program might run out of resources at one point in the future.
    Since you are appending to your file, maybe yo don't need any shift register, just use the data points of the current iteration. Place your save operations in a case structure and keep appending the new data to your file only if the case is true.
    It is also very inefficient to use highlevel file IO here,because each instance opens and closes the file. I recommend to open the file once outside the loop, then use low level IO to append, and close the file once the big loop is done.
    LabVIEW Champion . Do more with less code and in less time .

  • Photo booth not working correctly/ sound and image wont record at the same time

    Everytime i record a video on my photobooth, the sound doesnt record at all. Either its that, or it does record but it doesnt record accordingly, so the sound is ahead of the video when i play it

    Hi Mark,
    From your example, it looks like you're implementing a JSP application? I'd strongly recommend using interMedia Java Classes for Servlet and JSPs. Using this Java library has many advantages over using the Web Agent. For example, you can write a single, integrated, pure Java application, without the need to manage a separate component, such the Web Agent, to handle the multimedia data. Another advantage over the Web Agent is better support for HTML forms, including textareas, field values greater than 255 characters, and so forth. Its also much easier to provide a better user interface, where text-based and media data can be mixed in one upload form, then validated and processed in a single step.
    The Java class library ship with the Oracle9i 9.0.1 CDs. You can download a copy for use with Oracle8i 8.1.6/8.1.7 from the interMedia software page on OTN. Alongside the software download link, on this same page, you'll also find links to the README and the online Javadoc. In addition, there's also a link to the sample application kit. There's a servlet example and a JSP example, both of which implement a simple photo album application and illustrate how to use interMedia Java Classes for Servlet and JSPs to upload, process (create thumbnails) and retrieve images stored using the interMedia ORDImage type.
    Hope this helps.
    In order to better understand the variety of ways in which our customers are using interMedia, we'd be very interested in knowing a little more about your application, the interMedia functionality that you are using, and how you are developing and deploying your application. If you are able to help us, please send a short email message with some information about your application, together with any comments you may have, to the Oracle interMedia Product Manager, Joe Mauro, at [email protected] Thank you!
    Regards,
    Simon
    null

Maybe you are looking for