ros-drivers / audio_common

Common code for working with audio in ROS
BSD 3-Clause "New" or "Revised" License
86 stars 151 forks source link

How to change the wave or mp3 audio to a pcm format data? #88

Open 78226415 opened 7 years ago

78226415 commented 7 years ago

Hi every one: WAV and PCM files are both digital audio files. WAV files are more commonly used by Windows-based computers and can contain either compressed audio or uncompressed audio. A PCM file is used for uncompressed audio only, in its raw form. As you known, the audio_capture is providing wave and mp3 data, but i need the raw pcm format data, could audio_capture provides it? Or How to change the wave or mp3 audio to a pcm format data? Or other solutions? thanks.

trainman419 commented 7 years ago

I'm not currently accepting feature requests for audio_common, but if you want to implement this yourself I will review your pull request.

If PCM is raw audio data, it may be difficult to play it without additional metadata specifying the sample rate, bit depth and number of channels.