mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Just zero the buffer if we failed to open the file
This commit is contained in:
parent
cefc0bc96f
commit
f8e32f4a71
1 changed files with 3 additions and 1 deletions
|
@ -104,8 +104,10 @@ public:
|
|||
bool IsOK() { return raw_data_ != 0; }
|
||||
|
||||
void Read(short *buffer, int len) {
|
||||
if (!raw_data_)
|
||||
if (!raw_data_) {
|
||||
memset(buffer, 0, len * 2 * sizeof(s16));
|
||||
return;
|
||||
}
|
||||
while (bgQueue.size() < len * 2) {
|
||||
int outBytes;
|
||||
decoder_->Decode(raw_data_ + raw_offset_, raw_bytes_per_frame_, (uint8_t *)buffer_, &outBytes);
|
||||
|
|
Loading…
Add table
Reference in a new issue