Re: Changing mSampleRate for an Audio File
Re: Changing mSampleRate for an Audio File
- Subject: Re: Changing mSampleRate for an Audio File
- From: "Asher Vander Heiden" <email@hidden>
- Date: Mon, 24 May 2004 15:26:58 +1000
To Bill,
Hey thanks for your email ......
While what you suggested worked fine, my original email addressed the fact
that I was working on my own Audio Sample Rate Converter.
This means that while there were no errors during processing and the format
of the destination file ended up with the right format, I actually needed
the file NOT to be convertered because I was doing my own sample rate
conversion.
I'm wondering if there is a way to bypass or disable the Audio Conversion
that is currently happening in the 'auprocess'. At the moment I can't work
out how to get around this problem.
Thank you,
Asher Vander Heiden
From: William Stewart <email@hidden>
To: Asher Vander Heiden <email@hidden>
CC: email@hidden, email@hidden
Subject: Re: Changing mSampleRate for an Audio File
Date: Thu, 20 May 2004 13:03:19 -0700
On 20/05/2004, at 3:57 AM, Asher Vander Heiden wrote:
Hey Bob,
I've already tried what you suggest.
The problem is that I get errors when I try to fill the Destination Audio
Fiie with the data from the Source Audio File. Why? because they are of
different formats I'm guessing?
At the moment I'm using the 'auprocess' with the 'ReverseOfflineUnit' and
the same thing happens. When I try to use different
AudioStreamBasicDescription for the Destination Audio Fiie and Source
Audio File it fails to accept this.
That code was written only to do basically the same sample rate - so I
haven't tested this if you are trying to write a different format than the
source.
I think the only change that you'd have to make is that the file format
for the dest is what you want (ie. with the different sample rate), but
the ClientFormat for that dest file would be the same sample rate as the
source file (as you are going to be processing the audio at the source
file's sample rate I presume) - then the CAAudioFile would include the
sample rate converter for you
(You could do it the reverse way as well, where you read the source file's
data, but then have CAAudioFile do a rate conversion on it to the
destination format)....
CAAudioFile has essentially 2 formats - the file format and the client
format (the client format MUST be PCM, but the file format can be anything
legal)...
So, I think you just need to make sure you're setting these up properly
and it should work just fine.
This is why I needed to change the mSampleRate of the Destination Audio
Fiie AFTER I have created the file and completed all the signal
processing.
Not quite - you'd rate convert the data before it gets written to the file
by setting the client data and dest file formats up correctly
HTH
Bill
Thanks for your answer,
Asher
From: Bob Aron <email@hidden>
To: Asher Vander Heiden <email@hidden>
Subject: Re: Changing mSampleRate for an Audio File
Date: Wed, 19 May 2004 09:21:40 -0700
It sounds like you are not setting the AudioStreamBasicDescription
correctly when you create the new audio file. Are you using
AudioFileCreate() and passing it the ASBD describing your newly
formatted data? What format is the data that you are converting from and
to?
bob aron
____________________________________________
CoreAudio Team
Apple Computer Inc.
(408) 974-1221
email@hidden
On May 19, 2004, at 3:46 AM, Asher Vander Heiden wrote:
Hello,
Is it possible to change the 'sample rate' of an AudioFile, without
using the Audio Converter?
The reason for this is that I have been working on my own Sample Rate
Converter, which works on manipulating the Audio Stream of an existing
Audio File and saving the stream into a New file. So therefore the New
file that has been created has samples in the new sample rate, while
the AudioStreamBasicDescription, of the New file, displays the old
sample rate.
I'm finding it really difficult to manually change the value of
mSampleRate within the New files AudioStreamBasicDescription. Even if I
could do this I'm not quite sure that this is the only value that needs
to be changed within AudioStreamBasicDescription.
I would appreciate it if someone could tell me how this could be
done.......
I'm beginning to think that maybe it can't....
Please Help ....
Asher Vander Heiden
_________________________________________________________________
Personalise your mobile chart ringtones and polyphonics. Go to
http://ringtones.com.au/ninemsn/control?page=/ninemsn/main.jsp
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
------------------------------------------------------------------
Rule 17:
Wine & Cheese, need I say more?
summarized from the '113 Rules of Leisure'
- as decreed by the Leisure Master
_________________________________________________________________
What's your house worth? Click here to find out:
http://www.ninemsn.realestate.com.au
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
-- mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________ __
Culture Ship Names:
Ravished By The Sheer Implausibility Of That Last Statement [GSV]
I said, I've Got A Big Stick [OU]
Inappropiate Response [OU]
Far Over The Borders Of Insanity And Still Accelerating [Eccentric]
________________________________________________________________________ __
_________________________________________________________________
What's your house worth? Click here to find out:
http://www.ninemsn.realestate.com.au
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.