Well I tried this and that, and finally fixed that problem thoug I don't really understand why this works only this way. I got this method:
I actually *dislike* code that works without absolutly understanding it. I mean I allocated the channel before, so why do I have to alloc again to prevent overwriting by my other channels. |confused| Anyway, nice to have it working.
Method PlayM( MusicNr:Byte ) If ChannelPlaying( MusicChannel ) StopChannel( MusicChannel ); EndIf MusicChannel = AllocChannel( ); 'I added this line and that solved my problem MusicChannel = PlaySound( Music[MusicNr], MusicChannel ); EndMethod
I actually *dislike* code that works without absolutly understanding it. I mean I allocated the channel before, so why do I have to alloc again to prevent overwriting by my other channels. |confused| Anyway, nice to have it working.