mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 06:53:59 +02:00
fix missing bytes on read for audio injector
This commit is contained in:
parent
e6cba99c0e
commit
9b72762eb8
1 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ AudioInjector::AudioInjector(const char* filename) :
|
|||
_numTotalSamples = totalBytes / 2;
|
||||
_audioSampleArray = new int16_t[_numTotalSamples];
|
||||
|
||||
sourceFile.read((char *)_audioSampleArray, _numTotalSamples);
|
||||
sourceFile.read((char *)_audioSampleArray, totalBytes);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ void AudioInjector::addSamples(int16_t* sampleBuffer, int numSamples) {
|
|||
}
|
||||
|
||||
void AudioInjector::injectAudio() {
|
||||
if (_audioSampleArray != NULL) {
|
||||
if (_audioSampleArray) {
|
||||
_isInjectingAudio = true;
|
||||
|
||||
timeval startTime;
|
||||
|
|
Loading…
Reference in a new issue