Examples of low level control (synthesis) of audio ? - speakers, HDMI audio
Zoadian
no at no.no
Thu Aug 22 17:13:48 UTC 2024
On Thursday, 22 August 2024 at 16:56:05 UTC, Stephen Tashiro
wrote:
> Are there good explanations or examples of code for low level
> control of audio in Dlang?
>
> I assume that all high level audio synthesis programs (music,
> speech synthesis, etc.) rely on some common method of outputing
> sound. I also assume the output to analog speakers must be
> different code than output over HDMI. Is that correct?
>
> I visualize the final output as data that stores a waveform as
> a sequence of values that represent amplitudes. Is that low
> level of representation necessary? - or do modern speakers and
> audio devices have built-in programs that accept more concise
> formats?
There are many ways to output audio. this is what i use:
https://www.portaudio.com/
and yes, audio is just 2 channels (left+right) of amplitudes. the
number of values per time depends on the samplerate of the audio
device.
More information about the Digitalmars-d
mailing list