Re: [AD] get_audio_stream_buffer

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Fri, 2004-07-16 at 16:51 +0300, Serge Semashko wrote:

> Done, a smaller part of code that can be used to reproduce the problem 
> is here: http://ufo2000.lxnt.info/files/other/music-bug.zip
> 
> It required DUMB library version 0.9.2 installed (http://dumb.sf.net)
> 
> I tested this on two Linux systems (with and without NPTL), with both 
> 4.0.3 and 4.1.14 versions of Allegro library. This bug does not seem to 
> show up in Windows.
> 
> 
> I suspect there is a problem with initializing sound as
> 
> install_sound(DIGI_AUTODETECT, MIDI_NONE, NULL);
> 
> and then using the code that contains the following lines
> 
> allegro_midi = load_midi(filename);
> if (allegro_midi) {
> 	play_midi(allegro_midi, 1);
> 	return true;
> }
> 
> When I comment out attempt to load and play the file as midi, I could 
> not reproduce the problem (will try to make it run for the whole night 
> to check if it really disappeared).
> 
> The question is: are there any sanity checks in allegro code when using 
> midi funtions without proper initialization? If there are not, could 
> they be added as it was really difficult to track the source of the 
> problem (does not show up in Windows, requires to be run for a rather 
> long time in Linux).
> 

Well, the above code should work fine, and play the midi with the
MIDI_NONE driver. That is, the midi_callbacks will still work, even
though no sound is played by default.

If it is causing the problem, then I don't know why. There may well be a
bug in the midi code. I'm not really sure though which sort of bug would
cause a problem like the described. Maybe a memory leak? And once disk
swapping occurs, sound playback gets bad. Would be interesting to know
the result you get. If it turns out it works now, then it could also be
the timer code being wrong. Maybe more than one user timer cause some
problems.

Another possibility would be dumbogg - but I'm sure Ben can say more to
that.

-- 
Elias Pschernig





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/