Commit 3033dfe1 authored by schreibfaul1's avatar schreibfaul1

More Vorbis files that won't play #650

parent 072745e3
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* Created on: Oct 26.2018 * Created on: Oct 26.2018
* *
* Version 3.0.8i * Version 3.0.8j
* Updated on: Jan 23.2024 * Updated on: Feb 02.2024
* Author: Wolle (schreibfaul1) * Author: Wolle (schreibfaul1)
* *
*/ */
...@@ -4267,6 +4267,7 @@ int Audio::sendBytes(uint8_t* data, size_t len) { ...@@ -4267,6 +4267,7 @@ int Audio::sendBytes(uint8_t* data, size_t len) {
return 1; return 1;
} }
// status: bytesDecoded > 0 and m_decodeError >= 0 // status: bytesDecoded > 0 and m_decodeError >= 0
char* st = NULL;
switch(m_codec) { switch(m_codec) {
case CODEC_WAV: memmove(m_outBuff, data, len); // copy len data in outbuff and set validsamples and bytesdecoded=len case CODEC_WAV: memmove(m_outBuff, data, len); // copy len data in outbuff and set validsamples and bytesdecoded=len
if(getBitsPerSample() == 16) m_validSamples = len / (2 * getChannels()); if(getBitsPerSample() == 16) m_validSamples = len / (2 * getChannels());
...@@ -4280,23 +4281,26 @@ int Audio::sendBytes(uint8_t* data, size_t len) { ...@@ -4280,23 +4281,26 @@ int Audio::sendBytes(uint8_t* data, size_t len) {
break; break;
case CODEC_FLAC: if(m_decodeError == FLAC_PARSE_OGG_DONE) return bytesDecoded; // nothing to play case CODEC_FLAC: if(m_decodeError == FLAC_PARSE_OGG_DONE) return bytesDecoded; // nothing to play
m_validSamples = FLACGetOutputSamps() / getChannels(); m_validSamples = FLACGetOutputSamps() / getChannels();
if(FLACgetStreamTitle()) { st = FLACgetStreamTitle();
AUDIO_INFO(FLACgetStreamTitle()); if(st) {
if(audio_showstreamtitle) audio_showstreamtitle(FLACgetStreamTitle()); AUDIO_INFO(st);
if(audio_showstreamtitle) audio_showstreamtitle(st);
} }
break; break;
case CODEC_OPUS: if(m_decodeError == OPUS_PARSE_OGG_DONE) return bytesDecoded; // nothing to play case CODEC_OPUS: if(m_decodeError == OPUS_PARSE_OGG_DONE) return bytesDecoded; // nothing to play
m_validSamples = OPUSGetOutputSamps(); m_validSamples = OPUSGetOutputSamps();
if(OPUSgetStreamTitle()) { st = OPUSgetStreamTitle();
AUDIO_INFO(OPUSgetStreamTitle()); if(st){
if(audio_showstreamtitle) audio_showstreamtitle(OPUSgetStreamTitle()); AUDIO_INFO(st);
if(audio_showstreamtitle) audio_showstreamtitle(st);
} }
break; break;
case CODEC_VORBIS: if(m_decodeError == VORBIS_PARSE_OGG_DONE) return bytesDecoded; // nothing to play case CODEC_VORBIS: if(m_decodeError == VORBIS_PARSE_OGG_DONE) return bytesDecoded; // nothing to play
m_validSamples = VORBISGetOutputSamps(); m_validSamples = VORBISGetOutputSamps();
if(VORBISgetStreamTitle()) { st = VORBISgetStreamTitle();
AUDIO_INFO(VORBISgetStreamTitle()); if(st) {
if(audio_showstreamtitle) audio_showstreamtitle(VORBISgetStreamTitle()); AUDIO_INFO(st);
if(audio_showstreamtitle) audio_showstreamtitle(st);
} }
break; break;
} }
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* Created on: Oct 28,2018 * Created on: Oct 28,2018
* *
* Version 3.0.8i * Version 3.0.8j
* Updated on: Jan 23.2024 * Updated on: Feb 02.2024
* Author: Wolle (schreibfaul1) * Author: Wolle (schreibfaul1)
*/ */
......
...@@ -617,7 +617,7 @@ int VORBISparseOGG(uint8_t *inbuf, int *bytesLeft){ ...@@ -617,7 +617,7 @@ int VORBISparseOGG(uint8_t *inbuf, int *bytesLeft){
s_f_vorbisParseOgg = false; s_f_vorbisParseOgg = false;
int ret = 0; (void)ret; int ret = 0; (void)ret;
int idx = VORBIS_specialIndexOf(inbuf, "OggS", 1024); int idx = VORBIS_specialIndexOf(inbuf, "OggS", 8192);
if(idx != 0){ if(idx != 0){
if(s_f_oggContinuedPage) return ERR_VORBIS_DECODER_ASYNC; if(s_f_oggContinuedPage) return ERR_VORBIS_DECODER_ASYNC;
inbuf += idx; inbuf += idx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment