filebitSignal I/O:Soundfile Queriesfilebitfilebit
Returns the number of bits in each sample in a sound file.
Description
Returns the number of bits in each sample in a sound file.
Syntaxir filebit ifilcod [, iallowraw]Initializationifilcod -- sound file to be queried
iallowraw -- (Optional) Allow raw sound files (default=1)
Performancefilebit returns the number of bits in each
sample in the sound file ifilcod. In the
case of floating point samples the value -1 is returned for
floats and -2 for doubles. For non-PCM formats the value is
negative, and based on libsndfile's format encoding.
Examples
Here is an example of the filebit opcode. It uses the file filebit.csd,
and mary.wav.
Example of the filebit opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
The audio file mary.wav is in monoaural CD format, so filebit's output should include a line like this:
bit depth = 16 bit
See alsoSound File QueriesCreditsAuthor: &namevictor;July 1999New in Csound version 5.11