Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better documentation with the examples #8

Open
Andres6936 opened this issue Nov 19, 2020 · 7 comments
Open

Better documentation with the examples #8

Andres6936 opened this issue Nov 19, 2020 · 7 comments

Comments

@Andres6936
Copy link

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.

@vinodkoul
Copy link
Contributor

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

@Andres6936
Copy link
Author

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.

@vinodkoul
Copy link
Contributor

Sorry somehow this slipped thru..

Can you please tell me:

  1. which hardware device you are using this one
  2. give me steps to reproduce this
  3. attach the mp3 file you tried with

@Andres6936
Copy link
Author

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
  1. attach the mp3 file you tried with

With any mp3 file: MPEG-1 Layer 3 - Bitrate 320 kbps - Sample rate: 44100 Hz

@vinodkoul
Copy link
Contributor

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
Copy link
Author

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 ~ $ 

@vinodkoul
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants