I swear I saw a document once about it but now I cannot find it, I'm wondering
how I can launch my NSM client app, via NSM, but also via a terminal so I can
see the standard out/error? Also, being able to use GDB would be great.
I have a bug somewhere in my app shutdown process [via NSM] that only seems to
happen with NSM. I'd like to resolve that :)
Thanks to anyone who can clue me in or point me to this doc!
Alex
Am 01.05.2015 um 11:49 schrieb David Griffith:
> I really don't want to do that. My application has a curses interface and I don't want to pull in lots of GUI dependencies.
Maybe Gorilla Audio then? I don't know it, I just found it searching for
"audio mixing library".
https://code.google.com/p/gorilla-audio/
Pros: ANSI C, MIT license, cross-platform, high-level
Cons: no MOD support (but can be extended), development by the original
author seems to have stopped.
I see you alredy created your own fork of the library on Github. What
was your experience with it?
Chris
I've been playing around with libsndfile, libvorbisfile, libmodplug, and
libao to provide background music and sound effects for a game engine. I
have a solid handle on making one noise at a time, but I don't understand
mixing. At first I thought I would have to write my own mixer and handle
the channels, sample rate, and sample size issues myself. I really don't
want to have to do that. Then I noticed in the libao documentation that
nothing says that I cannot spawn two threads, each of which calls
ao_open_live() and ao_play() on different sound files. Indeed, the docs
for ao_initialize() seem to suggest this can be done with the statement
that it be called in the main thread.
I tried this and it works so erratically that I'm not sure libao was
written with this in mind. I get these results in order of likelihood:
1) "Segmentation fault"
2) "*** glibc detected *** ./threadtest7: malloc(): memory corruption
(fast): 0x0000000001bc5390 *** Bus error"
3) "*** glibc detected *** ./threadtest7: double free or corruption (out):
0x00000000018ba2e0 ***"
4) A bit of the first file, then the second file.
5) Only the second file.
6) Both files messily mixed with a zipping noise. (very rare)
Is libao in fact intentionally capable of doing this? If not, what are my
options for mixing music and sound effects? I really don't want to use
SDL_mixer for a variety of reasons, chiefly because my program is
terminal-only. Virtual beer if you can guess what the program is.
--
David Griffith
dave(a)661.org
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?