mirror of
https://github.com/collinsmith/riiablo.git
synced 2024-12-22 22:04:28 +07:00
Added custom support for MpqFileHandle#read() to support audio playback
Audio playback required FileHandle reference, can't pass stream directly Audio classes call FileHandle#read()
This commit is contained in:
parent
264a7a9630
commit
c70c008861
@ -482,7 +482,10 @@ public final class MpqFileHandle extends FileHandle implements ReferenceCounted
|
||||
|
||||
@Override
|
||||
public InputStream read() {
|
||||
return unsupported("not supported for mpq files");
|
||||
// required by music files, restricting for everything else
|
||||
return FilenameUtils.isExtension(filename, "WAV")
|
||||
? stream(true)
|
||||
: unsupported("not supported for mpq files");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user