package require TclMixer

proc end_MUSIC {} {
    tclmixer::free $::mus
    unset ::mus
}

proc end_SOUND channel {
    incr ::count
    if {$::count < 10} {
	tclmixer::play $::snd
	return
    }
    tclmixer::free $::snd
    unset ::snd
}


set mus [tclmixer::music [file join [file dirname [info script]] test.mod]]
tclmixer::mixConfig -music end_MUSIC
tclmixer::play $mus

set count 0
set snd [tclmixer::sound [file join [file dirname [info script]] reload.ogg]]
tclmixer::mixConfig -sound end_SOUND
tclmixer::play $snd

