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)
Tsunami.trackGain(i_Track, i_Gain);
Tsunami.trackLoop(i_Track, true);
Tsunami.trackLoad(i_Track, i_Channel, true);
Tsunami.resumeAllInSync();
and later, I try to stop the playing loop, but it doesn’t work
Tsunami.trackLoop(i_Track, false);
but at the same place if I replace this line by a stop command, the track stop well
Tsunami.trackStop(i_Track);
Is it a normal behavior? I think not, but don’t know why.
Thank in advance
It’s not clear what you’re expecting to happen when you disable looping for a track that is playing. The correct behavior is that the track will continue to play until the end and then stop, since it’s no longer looping. If you want the track to stop immediately, you need to use the stop command.
Dear creator thank for your reply,
You 're right me observations didn’t clear.
When I sent the command
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.
tsunami
September 2, 2019, 8:05am
4
I made other test and write a realy small code (bellow),to managed a track (number 11) of 10 secondes with 3 switches
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
void Tsunami::trackLoop(int trk, bool enable) {
if (enable)
{ trackControl(trk, TRK_LOOP_ON, 0, 0); }
else
{ 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?