Home » Extra libraries, Code snippets, applications etc. » OS Problems etc., Win32, POSIX, MacOS, FreeBSD, X11 etc » [Debian, Ubuntu] Add "sox" package dependency
[Debian, Ubuntu] Add "sox" package dependency [message #44224] |
Fri, 30 January 2015 20:01 |
|
Klugier
Messages: 1083 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello,
In latest nightly version we use "play" command from package "sox" to play several system sounds. I think it would be nice to have this command after upp installation.
So the file debian should look like this one:
apt-get install g++
apt-get install make
apt-get install libgtk2.0-dev
apt-get install libnotify-dev
apt-get install libbz2-dev
apt-get install sox
Sincerely,
Klugier
U++ - one framework to rule them all.
|
|
|
Re: [Debian, Ubuntu] Add "sox" package dependency [message #44228 is a reply to message #44224] |
Sun, 01 February 2015 13:31 |
|
Hi Klugier,
I've noticed the recent changes. However, I'm not sure if the sox package really should be a hard dependency. It is definitely not necessary for the upp package, as the sources work just as well without it. Only the applications created with U++ actually depend on it, and even those do not break when it is not present. They merely stop beeping. So for now, I will add it to recommended dependencies in theide package.
By the way: I was looking at the sox package and noticed that it also provides library with C API. It should be possible to use the library directly, instead of calling the "play" in new process. It would be bit more work, but on the other hand, it could make a nice and universal sound package for U++. Probably much better than the one I created couple years ago using portaudio (which now rots in bazaar ). If you're interested, nice example of playing sound with libsox can be found at github.
Best regards,
Honza
|
|
|
Re: [Debian, Ubuntu] Add "sox" package dependency [message #44232 is a reply to message #44228] |
Mon, 02 February 2015 21:38 |
|
Klugier
Messages: 1083 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello,
Quote:
I've noticed the recent changes. However, I'm not sure if the sox package really should be a hard dependency. It is definitely not necessary for the upp package, as the sources work just as well without it. Only the applications created with U++ actually depend on it, and even those do not break when it is not present. They merely stop beeping. So for now, I will add it to recommended dependencies in theide package.
For me, state "Recommended" accurately reflects to the current situation
Quote:
By the way: I was looking at the sox package and noticed that it also provides library with C API. It should be possible to use the library directly, instead of calling the "play" in new process. It would be bit more work, but on the other hand, it could make a nice and universal sound package for U++. Probably much better than the one I created couple years ago using portaudio (which now rots in bazaar Smile ). If you're interested, nice example of playing sound with libsox can be found at github.
Sounds good, but LGPL license is not good (doesn't permit static linking). We should use something that posses more liberal license. For example PortAudio.
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Mon, 02 February 2015 21:38] Report message to a moderator
|
|
|
Re: [Debian, Ubuntu] Add "sox" package dependency [message #44233 is a reply to message #44232] |
Tue, 03 February 2015 06:32 |
|
Klugier wrote on Mon, 02 February 2015 21:38Quote:
By the way: I was looking at the sox package and noticed that it also provides library with C API. It should be possible to use the library directly, instead of calling the "play" in new process. It would be bit more work, but on the other hand, it could make a nice and universal sound package for U++. Probably much better than the one I created couple years ago using portaudio (which now rots in bazaar Smile ). If you're interested, nice example of playing sound with libsox can be found at github.
Sounds good, but LGPL license is not good (doesn't permit static linking). We should use something that posses more liberal license. For example PortAudio.
Hi Klugier,
As I mentioned in the paragraph you quote, I already tried with portaudio Didn't work very well... Portaudio is very low-level. You have to handle the buffers, select right hardware, set correct sampling and channels etc. Also, portaudio doesn't care about sound formats, you have to do the decoding yourself, or via another libraries.
Sox on the other hand can play many formats out of the box and the API is one level higher. Instead of saying "play this array of integers on /dev/snd", you can just programm it to "play this file on default sound output" That makes things a lot easier. I didn't check the license before, I'd probably hasitate about it being LGPL too... On linux/bsd it would probably be no problem to link it dynamically, but on windows it would probably mean we'd have to implement it some other way - which doesn't seem to be very good idea, unless it could be done directly via windows API.
From a quick search a better licensed option could be SFML, but it contains much more than just the sound handling. There is no need to pull another graphic library into U++ and I'm not sure if the only the sound part could be extracted...
Best regards,
Honza
|
|
|
Goto Forum:
Current Time: Sun Oct 13 03:04:54 CEST 2024
Total time taken to generate the page: 0.02746 seconds
|