Fix&speedup
This commit is contained in:
parent
e1d185dbe9
commit
7aa6ab4eab
1 changed files with 4 additions and 4 deletions
|
@ -105,7 +105,7 @@ public class Analyzer //Based on NativeBass example 'Spectrum'
|
||||||
public boolean start(CommandSender sender, String file)
|
public boolean start(CommandSender sender, String file)
|
||||||
{
|
{
|
||||||
if (playing)
|
if (playing)
|
||||||
tt.cancel();
|
stopPlaying();
|
||||||
if (!playFile(sender, file))
|
if (!playFile(sender, file))
|
||||||
return false;
|
return false;
|
||||||
// setup update timer (50hz)
|
// setup update timer (50hz)
|
||||||
|
@ -116,7 +116,7 @@ public class Analyzer //Based on NativeBass example 'Spectrum'
|
||||||
{
|
{
|
||||||
BASS_ChannelGetData(chan, buffer, BASS_DATA_FFT2048); //Get the FFT data
|
BASS_ChannelGetData(chan, buffer, BASS_DATA_FFT2048); //Get the FFT data
|
||||||
}
|
}
|
||||||
}, 50, 50);
|
}, 25, 25);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,8 +132,8 @@ public class Analyzer //Based on NativeBass example 'Spectrum'
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
deinit = true;
|
deinit = true;
|
||||||
|
if (playing)
|
||||||
tt.cancel();
|
stopPlaying();
|
||||||
BASS_Free();
|
BASS_Free();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue