tinycompress
tinycompress copied to clipboard
Better documentation with the examples
I have compiled the program and when I run the cplay
script I get an error:
andres6936@Tierra ~/CLionProjects/tinycompress-master/src/utils $ cplay TestAudio.mp3
Error: Can't find sync word
I have already checked out different mp3 files and I keep getting the same error. I have also tried different options, but it is always the same error.
Well the cplay is a simple test app which looks for sync word for MP3 files at default position, lots is files will not have it, hence your experience.
I would recommend trying a better tool like fcplay which utilises libavcodec for parsing for files and supports few other formats like mp3, FLAC etc
Fcplay can be enabled by providing additional flag to gitcompile (not this is licensed as LGPL)
./gitcompile --enable-fcplay
I have performed the steps you have mentioned, compiled and when I use it I receive the following message.
andres6936@Tierra ~/CLionProjects/tinycompress-master/src/utils-lgpl $ ./fcplay TestAudio.mp3
Unable to open TestAudio.mp3: Invalid data found when processing input
I have tried with several mp3's and the error still persists.
Sorry somehow this slipped thru..
Can you please tell me:
- which hardware device you are using this one
- give me steps to reproduce this
- attach the mp3 file you tried with
andres6936@Tierra ~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
- attach the mp3 file you tried with
With any mp3 file: MPEG-1 Layer 3 - Bitrate 320 kbps - Sample rate: 44100 Hz
andres6936@Tierra ~ $ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: Intel [HDA Intel], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital] Subdevices: 1/1 Subdevice #0: subdevice #0
Okay can you try cplay with -v option.
Also I feel there is a bit of confusion as well as we need a compress device (with HW support and HW DSP) for this to work. Would you mind sending output of ls /dev/snd/ on your system... though I agree the error should have made it obvious to user that on this system cplay can't work, that is something I intend to fix
andres6936@Tierra ~ $ ./fcplay -v TestAudio.mp3
play_samples: entry
Unable to open TestAudio.mp3: Invalid data found when processing input
andres6936@Tierra ~ $ ls /dev/snd/
by-path controlC0 hwC0D2 pcmC0D0c pcmC0D0p pcmC0D1p pcmC0D2c seq timer
andres6936@Tierra ~ $
andres6936@Tierra ~ $ ./fcplay -v TestAudio.mp3 play_samples: entry Unable to open TestAudio.mp3: Invalid data found when processing input
andres6936@Tierra ~ $ ls /dev/snd/ by-path controlC0 hwC0D2 pcmC0D0c pcmC0D0p pcmC0D1p pcmC0D2c seq timer andres6936@Tierra ~ $
Right so no compr device exists here, so you cannot play mp3 files with this. I agree that error should have been clearer, I shall use fix that up..
You would need a system which supports compressed audio offload in order for you to play mp3 files with tinycompress Thanks