Is this how loopsound should work?

Blitz3D Forums/Blitz3D Programming/Is this how loopsound should work?

Well leave it to me to go to the Moon and Back with an answer lol, but changed the original tester code and I can't get the problem you mentioned, even with freeing the sound recource.

; Load Sounds

soundhandle1 = LoadSound("C:\windows\media\Windows XP Startup.wav")


	LoopSound soundhandle1
	soundchn1 = PlaySound(soundhandle1)


While Not KeyHit(1)


; Hit 1 to play Sound Loop 1

	If KeyHit(2)
		StopChannel Soundchn1
		FreeSound soundhandle1
	EndIf

; Hit 2 to play Sound Loop 1 (reloaded)

	If KeyHit(3)
		soundhandle1 = LoadSound("C:\windows\media\Windows XP Startup.wav")		
		LoopSound soundhandle1
		PlaySound (soundhandle1)

	EndIf

	
Wend
End


Hitting 1 shuts it down, and 2 reloads and loops and it plays from the beginning instead of in the middle or such.

So maybe I'm still missing your Loopsound issues completely, but in trying to emulate it I can't see how.

Topknot ;)