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?
Hi The lv2 version of GuitarSynth is working, thanks to falktx's DPF.
Get it from https://github.com/geraldmwangi/GuitarSynth-DPF.git if you
like. I'll release (post to LAU) it with bugfixes on the weekend.
Lg Gerald
Hi guys, I've started/hacked a small project called GuitarSynth. It is
meant as a playfield for exploring pitchdetection and synthesis for
Guitar, since I'm a guitarist. You can get on Github (git clone
https://github.com/geraldmwangi/GuitarSynth.git).
Its really basic but its fun to play with. It take an audio signal (your
guitar) extracts the fundamental pitch and drives some wavetable synths.
Feel free to manipulate it, I'll be happy to grant people write access
to the repo.
Btw on IRC my Nick is JimsonDrift, the name of my band (see
www.jimson-drift.de).
Cheers Gerald
Hi All,
As promised just at the closing ceremony of LAC, an email opening the
discussion of User Experience on Linux Audio. To all Developers,
please use this as a checklist and consider supporting each item. It
will improve the user experience.
1: Splash Screen
If an app takes more than one quarter of a second to open, use a
splash screen to give feedback. Feel free to contact me directly to
collaborate on a splash screen graphic if necessary. Ensure the splash
is shown immediately, before lengthy operations such as scanning for
files or loading content.
2: Presets
Synths and Effect plugins often provide presets - show a preset
selection "in" the main UI, or 1 click away. A fast way to browse
presets greatly enhances UX when searching for a sound. Ideally
support "scroll-wheel" interaction for changing presets.
3: Hotkeys
- Ctrl Q, Quit
- Ctrl W, Close Project
- Ctrl S, Save
- Ctrl Shift S, Save As
- Escape, Context sensitive "close"
I'm aware most of the recommendations above are obvious, and that many
programs support these already.
Cheers, -Harry
--
http://www.openavproductions.com
"Tim E. Real":
> > 6: Now turn the mouse pointer back on. Done.
>
> Ehm, missed on of the best parts:
> 6: Now return the mouse pointer to where it was when originally clicked.
> 7: Now turn the mouse pointer back on. Done.
>
>
Sounds like the perfect way to do it, and Radium works exactly the same way:
http://folk.uio.no/ksvalast/radiummouse.webm
(that's a 60fps video. Firefox doesn't seem to display 60fps videos
correctly. Chrome does though)
:-)
Hi guys,
I've improved the pitch detector in GuitarSynth so that when using a
plektrum the freq doesn't jerk around
during attack phases.
Plans for this weekend are to move it falktx's dpf, lets hope that goes
well.
Gerald
Srinivasan S wrote:
> did you mean that , If I use Jack plugin , does it resolve this
> problem (ie., does the CPU consumption reduce drastically instead of
> dshare)
It is unlikely that running your two programs on top of Jack will use
less CPU than with dshare. However, I don't know the details of your
architecture, so the only way to find out would be for you to try it.
Regards,
Clemens
Srinivasan S wrote:
> could you please provide me some sample application links without
> using dshare plugin , ie., using the two channels ie., left & right
> directly
I am not aware of any (sample) program that does something like this
(except maybe Jack, but floating-point samples would not be appropriate
for your application).
You have to implement this yourself.
Regards,
Clemens