• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Issues for loading an array of data into a stream buffer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Issues for loading an array of data into a stream buffer
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: 64bit processing possible?
  • Next by Date: Re: Issues for loading an array of data into a stream buffer
  • Previous by thread: Re: Echo cancellation and audio codec in coreaudio
  • Next by thread: Re: Issues for loading an array of data into a stream buffer
  • Index(es):
    • Date
    • Thread