fix airplay not working sometimes
This commit is contained in:
parent
8d9ac86514
commit
ccae1098fc
1 changed files with 4 additions and 1 deletions
|
@ -296,6 +296,7 @@ const CiderAudio = {
|
||||||
if (this._isBufferFull()) {
|
if (this._isBufferFull()) {
|
||||||
this._flush();
|
this._flush();
|
||||||
}
|
}
|
||||||
|
try{
|
||||||
let dataLength = audioRawData[0].length;
|
let dataLength = audioRawData[0].length;
|
||||||
for (let idx=0; idx<dataLength; idx++) {
|
for (let idx=0; idx<dataLength; idx++) {
|
||||||
for (let channel=0; channel < numberOfChannels; channel++) {
|
for (let channel=0; channel < numberOfChannels; channel++) {
|
||||||
|
@ -303,6 +304,8 @@ const CiderAudio = {
|
||||||
this._buffers[channel][this._bytesWritten] = value;
|
this._buffers[channel][this._bytesWritten] = value;
|
||||||
}
|
}
|
||||||
this._bytesWritten += 1;
|
this._bytesWritten += 1;
|
||||||
|
}} catch (e){
|
||||||
|
// console.log(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -377,7 +380,7 @@ const CiderAudio = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CiderAudio.audioNodes.recorderNode.parameters.get('isRecording').setValueAtTime(1, CiderAudio.context.currentTime);
|
CiderAudio.audioNodes.recorderNode.parameters.get('isRecording').setValueAtTime(1, CiderAudio.context.currentTime);
|
||||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.recorderNode);
|
CiderAudio.source.connect(CiderAudio.audioNodes.recorderNode);
|
||||||
|
|
||||||
});
|
});
|
||||||
clearInterval(searchInt);
|
clearInterval(searchInt);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue