• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
saving AudioBufferList
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

saving AudioBufferList


  • Subject: saving AudioBufferList
  • From: sheen mac <email@hidden>
  • Date: Fri, 15 Dec 2006 08:54:02 -0800 (PST)

Hi All,

I converted the AudioBufferList to NSData using dataWithBytes method.
And saved it into a file.But I can't restore the AudioData from the file
to AudioBufferList.My code also here

Please help me.

Thanks in Advance,
Sheen


OSStatus recordCallback(
                        AudioDeviceID device,
                        const AudioTimeStamp* now,
                        const AudioBufferList* input_data,
                        const AudioTimeStamp* input_time,
                        AudioBufferList* output_data,
                        const AudioTimeStamp* output_time,
                        void* client_data
                        )
{
  
    
    if(buf_Recorded < 256)
    {
    AudioBuffer *recordBuffer = &(recordBuffers[buf_Recorded].mBuffers[0]);
    recordBuffer->mNumberChannels = input_data->mBuffers[0].mNumberChannels;
    recordBuffer->mDataByteSize = input_data->mBuffers[0].mDataByteSize;
    memcpy(recordBuffer->mData,input_data->mBuffers[0].mData, input_data->mBuffers[0].mDataByteSize);
    
    buf_Recorded += 1;
    }
    
    
 
    return kAudioHardwareNoError;
}


NSData *dd=[NSData dataWithBytes:recordBuffers length:buf_Recorded*sizeof(AudioBufferList)];
[dd writeToFile:@"2.txt"];

NSData *mm=[NSData dataWithContentsofFile:@"2.txt"];
[mm getBytes:recordBuffers];


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: RE: A Rosetta wrapper AU
  • Next by Date: Re: A Rosetta wrapper AU
  • Previous by thread: Re: wavelet analysis
  • Next by thread: Problem with AudioUnitAdd/RemovePropertyListener
  • Index(es):
    • Date
    • Thread