From: arganoid AT fatal-design DOT com (Andrew R. Gillett) Newsgroups: comp.os.msdos.djgpp Subject: Allegro: Voice being cut off Date: Tue, 3 Nov 1998 22:44:01 -0000 Organization: Customer of Planet Online Lines: 43 Message-ID: NNTP-Posting-Host: modem-62.thorium.dialup.pol.co.uk X-Trace: newsreader1.core.theplanet.net 910133064 27218 62.136.44.190 (3 Nov 1998 22:44:24 GMT) NNTP-Posting-Date: 3 Nov 1998 22:44:24 GMT X-Newsreader: MicroPlanet Gravity v2.10 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com This is a repost. I originally posted it in June, but there was no response. The problem is still there, and I won't be able to release my game until it is fixed. The music of my game is stored as a number of large samples. These are played using the voice allocation commands, and the priority is set to 255. However, if I play a lot of other samples (using play_sample) at the same time, the music is sometimes cut off. When I say a lot at the same time, I mean many simultaneous samples, maybe twenty or more. Of course, there are not this many voices available, but I want the new samples to be cut off, not the music. The music is in three stages. When one stage is finished, the next stage is started using reallocate_voice. Here is the bit of code which does it: if (musictype <= 0) reallocate_voice (music_voice, (SAMPLE *)musicfile[ZOO_SHRINK].dat); else reallocate_voice (music_voice, (SAMPLE *)musicfile[DLD_SHRINK].dat); voice_set_priority (music_voice, 255); voice_set_playmode (music_voice, PLAYMODE_LOOP); voice_start (music_voice); I don't know, maybe I have to set the priority AFTER calling voice_start. Or maybe the priority doesn't work....? Btw, this only happens on the second (interlude) music. The only difference I can see is that, unlike the other parts of the music, this part does not loop, it just plays once. Also, the final stage of the game/music will only start when the interlude music has finished. If the interlude music is cut off, the game will not end properly :( -- Andrew Gillett http://argnet.fatal-design.com/ ICQ: 12142937