SparkFun Forums 

Where electronics enthusiasts find answers.

Questions &/or issues related to products in the Audio category should be posted in this forum.
Hi all,

Since one year I use to work with Tsunami boards, and it's really fine and work well.
But today for the first time, I used "trackLoop" command to change the loop option of an already playing track but there is no changes.

I manage the Tsunami by a serial port and use firmware 1.08m (mono).
So i start track playing (it works)
Code: Select all
Tsunami.trackGain(i_Track, i_Gain);
Tsunami.trackLoop(i_Track, true);
Tsunami.trackLoad(i_Track, i_Channel, true);
and later, I try to stop the playing loop, but it doesn't work
Code: Select all
Tsunami.trackLoop(i_Track, false);
but at the same place if I replace this line by a stop command, the track stop well
Code: Select all
Is it a normal behavior? I think not, but don't know why.
Thank in advance
Dear creator :) thank for your reply,
You 're right me observations didn't clear.
When I sent the command
Code: Select all
Tsunami.trackLoop(i_Track, false);
the track is still playing in infinity loop. It's like I didn't nothing.

So, I propably forgot something, or dodn't know that the "trackloop" command could be desturbed by an other.
I made other test and write a realy small code (bellow),to managed a track (number 11) of 10 secondes with 3 switches
Code: Select all
	if ((DI_Swith[0].b_State == true) && (DI_Swith[0].b_State_Z1 == false))	// PLAY
	{	ModuleWAV.trackGain(11, -20);
		ModuleWAV.trackLoop(11, true);
		ModuleWAV.trackPlaySolo(11, 0, true); }
	if ((DI_Swith[1].b_State == true) && (DI_Swith[1].b_State_Z1 == false))	// LOOP OFF
	{	ModuleWAV.trackLoop(11, false);	}
	if ((DI_Swith[2].b_State == true) && (DI_Swith[2].b_State_Z1 == false))	// STOP
	{	ModuleWAV.trackStop(11); }
and also add a line in the trackLoop function
Code: Select all
void Tsunami::trackLoop(int trk, bool enable) {
	if (enable)
	{	trackControl(trk, TRK_LOOP_ON, 0, 0); }
	{ 	trackControl(trk, TRK_LOOP_OFF, 0, 0);
		Serial.println("Loop OFF"); }
when the track is playing in infinit loop and I press the second swith "Loop OFF" appears in the serial consol, but there is no effet. The track is still playing infinitly....
I miss something.
What is the way to swith off the infinit loop when a track is playing?