Issues for loading an array of data into a stream buffer
Issues for loading an array of data into a stream buffer
- Subject: Issues for loading an array of data into a stream buffer
- From: David Lecoutre <email@hidden>
- Date: Mon, 3 Aug 2009 14:06:23 -0500
Hi all,
I'm developing an application for doing 3D sound. I'm
getting a sound buffer (a float[] ) through a java application ( actually I'm
playing a 1sec wav file ). I would like to play this buffer with the
CoreAudio sdk. I made the JNI code and I'm using the sample code
"DefaultOutputUnit" provided by the CoreAudio sdk. I made some
change in the code, instead of filling the buffer with the sine wave,
I'm loading my sound buffer. I've got some sound but it is only crap (
the sound is only noisy and not audible ). I don't know how to solve my
issue. If anybody has any suggestions, another way to do it, or samples
code that might help me... It would be very nice.
This is the change that I've made :
Float32 nextFloat = _mysundbuffer[(theLastPosition)];
static_cast<SInt16*>(inBuffer)[frame] = static_cast<SInt16>(nextFloat);(Sorry if my English is not perfect, this is not my first language)
Thanks,
--
David L-
_______________________________________________
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