I am getting a wave signal data in my program as the float array data (not from sound card!). How can I play this signal as a sound sample through the standard PC sound card?
Who knows the conversion algorithm of the float data to the PCM WAV-data?
Preferably in Java.
Float To PCM Conversion
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Re: Float To PCM Conversion
PCM data is simply a series of "sample values", where a "sample value" is the instantaneous amplitude at a point in time.
The sample values are at regular intervals according to the "sampling rate" (or "sample rate"). For example, if the sample rate is 44100 Hz, then the sample values represent the instantaneous amplitudes measured at intervals of 1/44100th second (0.000022676 seconds).
For 32-bit float PCM, sample values of +/- 1.0 equates to 0 dB.
To play 32-bit float data from an array, you need to send the data as a stream to the sound system via a "mixer object". See the Java sound API for more information: http://docs.oracle.com/javase/7/docs/te ... tents.html
The sample values are at regular intervals according to the "sampling rate" (or "sample rate"). For example, if the sample rate is 44100 Hz, then the sample values represent the instantaneous amplitudes measured at intervals of 1/44100th second (0.000022676 seconds).
For 32-bit float PCM, sample values of +/- 1.0 equates to 0 dB.
To play 32-bit float data from an array, you need to send the data as a stream to the sound system via a "mixer object". See the Java sound API for more information: http://docs.oracle.com/javase/7/docs/te ... tents.html
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: Float To PCM Conversion
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)