Cue Sheet input: Fix files with no length
This bug prevented zero length or unknown length files, such as FLAC files with no sample count in the header, or audio streams, from playing properly, and clipped their output to the 0 samples indicated by the field. Now it will simply allow wrapped files to decode until they stop producing output. Signed-off-by: Christopher Snowhill <kode54@gmail.com>CQTexperiment
parent
d6760c823a
commit
0b243158a0
|
@ -243,7 +243,7 @@
|
|||
|
||||
- (long)seek:(long)frame
|
||||
{
|
||||
if (frame > trackEnd - trackStart) {
|
||||
if (!noFragment && frame > trackEnd - trackStart) {
|
||||
//need a better way of returning fail.
|
||||
return -1;
|
||||
}
|
||||
|
@ -257,7 +257,7 @@
|
|||
|
||||
- (int)readAudio:(void *)buf frames:(UInt32)frames
|
||||
{
|
||||
if (framePosition + frames > trackEnd) {
|
||||
if (!noFragment && framePosition + frames > trackEnd) {
|
||||
frames = (UInt32)(trackEnd - framePosition);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue