Update PCM playback logic of ZSM player
This commit is contained in:
parent
7b2b050b34
commit
acf868d412
2 changed files with 4 additions and 4 deletions
|
@ -40,7 +40,7 @@
|
||||||
</TabInfo>
|
</TabInfo>
|
||||||
<TabInfo>
|
<TabInfo>
|
||||||
<wxString Value="/home/catmeow/neko-player/backends/playback/zsm/zsm_backend.cpp" Name="FileName"/>
|
<wxString Value="/home/catmeow/neko-player/backends/playback/zsm/zsm_backend.cpp" Name="FileName"/>
|
||||||
<int Value="228" Name="FirstVisibleLine"/>
|
<int Value="0" Name="FirstVisibleLine"/>
|
||||||
<int Value="0" Name="CurrentLine"/>
|
<int Value="0" Name="CurrentLine"/>
|
||||||
<wxArrayString Name="Bookmarks"/>
|
<wxArrayString Name="Bookmarks"/>
|
||||||
<IntVector Name="CollapsedFolds"/>
|
<IntVector Name="CollapsedFolds"/>
|
||||||
|
@ -131,8 +131,8 @@
|
||||||
</TabInfo>
|
</TabInfo>
|
||||||
<TabInfo>
|
<TabInfo>
|
||||||
<wxString Value="/home/catmeow/neko-player/backends/playback/zsm/zsm_backend.hpp" Name="FileName"/>
|
<wxString Value="/home/catmeow/neko-player/backends/playback/zsm/zsm_backend.hpp" Name="FileName"/>
|
||||||
<int Value="60" Name="FirstVisibleLine"/>
|
<int Value="0" Name="FirstVisibleLine"/>
|
||||||
<int Value="77" Name="CurrentLine"/>
|
<int Value="0" Name="CurrentLine"/>
|
||||||
<wxArrayString Name="Bookmarks"/>
|
<wxArrayString Name="Bookmarks"/>
|
||||||
<IntVector Name="CollapsedFolds"/>
|
<IntVector Name="CollapsedFolds"/>
|
||||||
</TabInfo>
|
</TabInfo>
|
||||||
|
|
|
@ -84,7 +84,7 @@ class ZsmBackend : public PlaybackBackend {
|
||||||
return (int16_t)((((int32_t)a) + ((int32_t)b)) >> 1);
|
return (int16_t)((((int32_t)a) + ((int32_t)b)) >> 1);
|
||||||
}
|
}
|
||||||
void audio_step(size_t samples) {
|
void audio_step(size_t samples) {
|
||||||
while (((pcm_read_ctrl() & 0x80) == 0 || pcm_fifo_avail() < samples) && remain > 0) {
|
while (pcm_fifo_avail() < samples && remain > 0) {
|
||||||
remain--;
|
remain--;
|
||||||
size_t oldpos = file->get_pos();
|
size_t oldpos = file->get_pos();
|
||||||
file->seek((cur++), SeekType::SET);
|
file->seek((cur++), SeekType::SET);
|
||||||
|
|
Loading…
Reference in a new issue