Re: Some help about how to process a signal.
Re: Some help about how to process a signal.
- Subject: Re: Some help about how to process a signal.
- From: Gregory Wieber <email@hidden>
- Date: Sun, 15 May 2011 09:31:42 -0700
If you've read about playing a wav file, the difference is that instead of reading frames of an audio file, you want to read frames from your signal array.
- The Audio Stream Basic Description (ASBD) of your project will determine what range the numbers in your signal array should be. (eg. -1 to 1, -32768 to 32768 for signed 16bit, etc).
- I'd suggest creating a struct that holds a phase_index variable, which you increase each time through your render loop (look up remote-IO and render input proc) and use it to access the numbers in your signal array. (In my project, phase_index is a float for accuracy, and I round it to use as an array index value.)
- The same struct should have a phase_increment value. The phase_increment is based on the sample rate and your desired tone-frequency.
- Fully read and understand the documentation regarding buffers, frames, etc.
I haven't had any coffee yet, so that info is a little off-the-cuff.
best,
Greg Wieber
2011/5/15 Jose María Gómez
<email@hidden>
I am new to CoreAudio and I am trying to figure out how to make a quite simple thing. What I would like to do is to output a simple sinosoidal signal to my audio card. I have read about how to play a .wav, but that is not what I need to do. What I really would like to do is to put some values of a discrete signal in an array and depending on a frecuency creating a signal and make it to sound in my computer.
Could you please give me some sample code ... thanks in advance.
_______________________________________________
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