Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Converting audio example? #1

Open
a-urth opened this issue Mar 18, 2015 · 3 comments
Open

Converting audio example? #1

a-urth opened this issue Mar 18, 2015 · 3 comments

Comments

@a-urth
Copy link

a-urth commented Mar 18, 2015

Hi. Could You, please, provide come example how to convert audio file from one format to another (wav -> mp3) using Your library?

@krig
Copy link
Owner

krig commented Mar 19, 2015

I wouldn't recommend using sox for this, usually it's not compiled with mp3 support for legal reasons. However, as I understand it you should be able to just name the output file with .mp3 as the file extension, and if you have a valid encoding defined, it should do the conversion. That is, if libsox is compiled with mp3 support.

@a-urth
Copy link
Author

a-urth commented Mar 27, 2015

Ok, I have compiled sox with mp3 support. How should I convert file?
OpenRead, OpenWrite and then? Read all samples from input to output sample by sample?
By the way Your example4 with conversion doesn't work.

@glaslos
Copy link

glaslos commented Jul 25, 2017

@krig any hint on how to set the input and output format?

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

No branches or pull requests

3 participants