set buffer size for a duration?
set buffer size for a duration?
- Subject: set buffer size for a duration?
- From: Paul Fredlein <email@hidden>
- Date: Fri, 11 Aug 2006 15:29:33 +1000
Hi,
I'm playing with MTCoreAudio and need to record, say, 5 seconds of audio.
int sample_rate, num_channels, buffer_frames; sample_rate = [inputDevice nominalSampleRate]; num_channels = [inputDevice channelsForDirection:kMTCoreAudioDeviceRecordDirection]; buffer_frames = [inputDevice deviceBufferSizeInFrames];
int duration = 5; int bufsize = duration * sample_rate * num_channels * ???????? buf = malloc(bufsize);
How do I calculate the bufsize?
Thanks,
Paul
|
_______________________________________________
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