csoundOptionForSampleEncoding

csoundOptionForSampleEncoding#

csoundengine.csoundlib.csoundOptionForSampleEncoding(encoding)[source]#

Returns the command-line option for the given sample encoding.

Given a sample encoding of the form pcmXX or floatXX, where XX is the bit-rate, returns the corresponding command-line option for csound

Parameters:

fmt (str) – the desired sample format. Either pcmXX, floatXX, vorbis where XX stands for the number of bits per sample (pcm24, float32, etc)

Return type:

str

Returns:

the csound command line option corresponding to the given format

Example

>>> csoundOptionForSampleEncoding("pcm24")
--format=24bit
>>> csoundOptionForSampleEncoding("float64")
--format=double