Re: schedule multiple Audio Files in one audio file player
Re: schedule multiple Audio Files in one audio file player
- Subject: Re: schedule multiple Audio Files in one audio file player
- From: MF <email@hidden>
- Date: Sun, 4 Jan 2009 17:50:24 +0100
Thanks so much Bill! This discontinuity issue has occurred to me for a while, without your explanation I might just take it granted for ever...
Actually the reason I use multiple file players is that I can't get the scheduling of multiple audio file regions in one audio file player right... i.e. the property setting of 'kAudioUnitProperty_ScheduledFileRegion' didn't' work as I've wished... The following is my setting...
// intend to schedule two regions of two distinct audio files...
ScheduledAudioFileRegion* testRGN = (ScheduledAudioFileRegion*) malloc (sizeof (ScheduledAudioFileRegion) * 2);
memset (testRGN, 0, sizeof (ScheduledAudioFileRegion) * 2);
ScheduledAudioFileRegion rgn, rgn1;
// some scheduling.... assigned to two AudioFileIDs
testRGN[0] = rgn;
testRGN[1] = rgn1;
AudioUnitSetProperty(previewAudioFileAU, kAudioUnitProperty_ScheduledFileRegion, kAudioUnitScope_Global, 0, testRGN, sizeof(ScheduledAudioFileRegion) *2);
Only the first element of the array testRGN will be played. I guess that the property setting of 'kAudioUnitProperty_ScheduledFileRegion' won't parse the input as an array... However, I can't either stack the schedule by scheduling the regions on after the other. I always have to reset the audio unit before schedule another audio file region, which means the previous schedule will be erased.
anyone knows how to schedule multiple file regions ?
thanks!
MF
On Sun, Jan 4, 2009 at 1:57 PM, work
<email@hidden> wrote:
You should allocate the max number of inputs you think you'll use, then you can just connect (or disconnect) to the inputs as you use them. You can't change the number of inputs without re-initialising the mixer, and that can cause discontinuities in the audio as you have to take it out of the signal chain to do this
With different file players, you are probably also dealing with files of different sample rates - you want to minimise the number of sample rate conversions you are doing, so you probably want to provide a mixer for each unique sample rate, and then resample to the playback rate.
Bill
On Dec 24, 2008, at 11:26 PM, MF wrote:
Hello List,
I am writing a sample-based sequencer. The app is initiated with 64 short audio clips ( around 5 to 10 seconds of each) loaded into the buffer. Currently I use a stereo mixer to host the input from Audio units (AudioFilePlayers). However, the default number of the mixer's input buses is not enough for the app. Can I dynamically increase the input number of a mixer? or shall I simply use multiple mixers to serve the huge amount of the audio inputs? Any suggestion would be appreciated!!
Thanks!
MF
_______________________________________________
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
_______________________________________________
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