mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-26 18:37:31 +09:00
Merge remote-tracking branch 'origin/master' into custom
This commit is contained in:
commit
d477f61fc1
220 changed files with 1411 additions and 2229 deletions
|
|
@ -396,7 +396,10 @@ MP3TrackDemuxer::Duration(int64_t aNumFrames) const {
|
|||
|
||||
MediaByteRange
|
||||
MP3TrackDemuxer::FindFirstFrame() {
|
||||
static const int MIN_SUCCESSIVE_FRAMES = 4;
|
||||
// This check is meant to avoid invalid frames from broken streams, but
|
||||
// small MP3 files and streams with odd header data can break this. Lowering
|
||||
// the value to 3 seems to help significantly.
|
||||
static const int MIN_SUCCESSIVE_FRAMES = 3;
|
||||
|
||||
MediaByteRange candidateFrame = FindNextFrame();
|
||||
int numSuccFrames = candidateFrame.Length() > 0;
|
||||
|
|
|
|||
|
|
@ -254,6 +254,9 @@ void
|
|||
AudioBuffer::CopyFromChannel(const Float32Array& aDestination, uint32_t aChannelNumber,
|
||||
uint32_t aStartInChannel, ErrorResult& aRv)
|
||||
{
|
||||
JS::AutoCheckCannotGC nogc;
|
||||
aDestination.ComputeLengthAndData();
|
||||
|
||||
uint32_t length = aDestination.Length();
|
||||
CheckedInt<uint32_t> end = aStartInChannel;
|
||||
end += length;
|
||||
|
|
@ -263,8 +266,6 @@ AudioBuffer::CopyFromChannel(const Float32Array& aDestination, uint32_t aChannel
|
|||
return;
|
||||
}
|
||||
|
||||
JS::AutoCheckCannotGC nogc;
|
||||
aDestination.ComputeLengthAndData();
|
||||
JSObject* channelArray = mJSChannels[aChannelNumber];
|
||||
const float* sourceData = nullptr;
|
||||
if (channelArray) {
|
||||
|
|
@ -295,6 +296,9 @@ AudioBuffer::CopyToChannel(JSContext* aJSContext, const Float32Array& aSource,
|
|||
uint32_t aChannelNumber, uint32_t aStartInChannel,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
JS::AutoCheckCannotGC nogc;
|
||||
aSource.ComputeLengthAndData();
|
||||
|
||||
uint32_t length = aSource.Length();
|
||||
CheckedInt<uint32_t> end = aStartInChannel;
|
||||
end += length;
|
||||
|
|
@ -309,7 +313,6 @@ AudioBuffer::CopyToChannel(JSContext* aJSContext, const Float32Array& aSource,
|
|||
return;
|
||||
}
|
||||
|
||||
JS::AutoCheckCannotGC nogc;
|
||||
JSObject* channelArray = mJSChannels[aChannelNumber];
|
||||
if (JS_GetTypedArrayLength(channelArray) != mLength) {
|
||||
// The array's buffer was detached.
|
||||
|
|
@ -317,7 +320,6 @@ AudioBuffer::CopyToChannel(JSContext* aJSContext, const Float32Array& aSource,
|
|||
return;
|
||||
}
|
||||
|
||||
aSource.ComputeLengthAndData();
|
||||
bool isShared = false;
|
||||
float* channelData = JS_GetFloat32ArrayData(channelArray, &isShared, nogc);
|
||||
// The channelData arrays should all have originated in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue