Update copyright year in lost files.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
+44
-44
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
/* Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation files
|
||||
@@ -26,12 +26,12 @@ const DEBUG_OUT = false;
|
||||
|
||||
const USE_FRAME_CB = 'requestVideoFrameCallback' in HTMLVideoElement.prototype;
|
||||
|
||||
renpyAudio = { };
|
||||
renpyAudio = {};
|
||||
|
||||
/**
|
||||
* A map from channel to channel object.
|
||||
*/
|
||||
let channels = { };
|
||||
let channels = {};
|
||||
let next_chan_id = 0;
|
||||
|
||||
let context = new AudioContext();
|
||||
@@ -50,14 +50,14 @@ let get_channel = (channel) => {
|
||||
}
|
||||
|
||||
c = {
|
||||
playing : null,
|
||||
queued : null,
|
||||
stereo_pan : context.createStereoPanner(),
|
||||
fade_volume : context.createGain(),
|
||||
primary_volume : context.createGain(),
|
||||
secondary_volume : context.createGain(),
|
||||
relative_volume : context.createGain(),
|
||||
paused : false,
|
||||
playing: null,
|
||||
queued: null,
|
||||
stereo_pan: context.createStereoPanner(),
|
||||
fade_volume: context.createGain(),
|
||||
primary_volume: context.createGain(),
|
||||
secondary_volume: context.createGain(),
|
||||
relative_volume: context.createGain(),
|
||||
paused: false,
|
||||
video: false,
|
||||
video_el: null,
|
||||
chan_id: next_chan_id++,
|
||||
@@ -278,7 +278,7 @@ let video_start = (c) => {
|
||||
c.video_el.muted = true;
|
||||
c.video_el.play().then(() => {
|
||||
// TODO?
|
||||
}).catch( (e) => {
|
||||
}).catch((e) => {
|
||||
console.warn('Video is NOT playing even when muted', e.name);
|
||||
renpyAudio.videoPlayPrompt(renpyAudio._web_video_prompt, c.video_el);
|
||||
});
|
||||
@@ -386,24 +386,24 @@ renpyAudio.queue = (channel, file, name, synchro_start, fadein, tight, start, en
|
||||
}
|
||||
|
||||
const q = {
|
||||
url: url,
|
||||
name : name,
|
||||
start : start, // TODO?
|
||||
end : end, // TODO?
|
||||
relative_volume : relative_volume,
|
||||
started : null,
|
||||
fadein : fadein, // TODO?
|
||||
fadeout: null, // TODO?
|
||||
tight : tight, // TODO?
|
||||
filter : renpyAudio.getFilter(afid),
|
||||
synchro_start : synchro_start,
|
||||
url: url,
|
||||
name: name,
|
||||
start: start, // TODO?
|
||||
end: end, // TODO?
|
||||
relative_volume: relative_volume,
|
||||
started: null,
|
||||
fadein: fadein, // TODO?
|
||||
fadeout: null, // TODO?
|
||||
tight: tight, // TODO?
|
||||
filter: renpyAudio.getFilter(afid),
|
||||
synchro_start: synchro_start,
|
||||
|
||||
period_stats: [0, 0], // time sum, count
|
||||
fetch_stats: [0, 0],
|
||||
draw_stats: [0, 0, 0, 0], // time sum, count, first timestamp, last timestamp
|
||||
blob_stats: [0, 0],
|
||||
array_stats: [0, 0],
|
||||
file_stats: [0, 0, 0, 0], // time sum, count, first timestamp, last timestamp
|
||||
period_stats: [0, 0], // time sum, count
|
||||
fetch_stats: [0, 0],
|
||||
draw_stats: [0, 0, 0, 0], // time sum, count, first timestamp, last timestamp
|
||||
blob_stats: [0, 0],
|
||||
array_stats: [0, 0],
|
||||
file_stats: [0, 0, 0, 0], // time sum, count, first timestamp, last timestamp
|
||||
};
|
||||
|
||||
if (c.video_el === null) {
|
||||
@@ -413,11 +413,11 @@ renpyAudio.queue = (channel, file, name, synchro_start, fadein, tight, start, en
|
||||
c.video_el.playsInline = true; // For autoplay on Safari
|
||||
document.body.appendChild(c.video_el);
|
||||
|
||||
c.video_el.addEventListener('loadedmetadata', function() {
|
||||
c.video_el.addEventListener('loadedmetadata', function () {
|
||||
c.video_size = [c.video_el.videoWidth, c.video_el.videoHeight];
|
||||
});
|
||||
|
||||
c.video_el.addEventListener('error', function(e) {
|
||||
c.video_el.addEventListener('error', function (e) {
|
||||
|
||||
});
|
||||
|
||||
@@ -433,7 +433,7 @@ renpyAudio.queue = (channel, file, name, synchro_start, fadein, tight, start, en
|
||||
c.is_playing = false;
|
||||
});
|
||||
|
||||
c.video_el.addEventListener('playing', function() {
|
||||
c.video_el.addEventListener('playing', function () {
|
||||
c.is_playing = true;
|
||||
});
|
||||
|
||||
@@ -462,19 +462,19 @@ renpyAudio.queue = (channel, file, name, synchro_start, fadein, tight, start, en
|
||||
}
|
||||
|
||||
const q = {
|
||||
source : null,
|
||||
buffer : null,
|
||||
name : name,
|
||||
start : start,
|
||||
end : end,
|
||||
relative_volume : relative_volume,
|
||||
started : null,
|
||||
fadein : fadein,
|
||||
source: null,
|
||||
buffer: null,
|
||||
name: name,
|
||||
start: start,
|
||||
end: end,
|
||||
relative_volume: relative_volume,
|
||||
started: null,
|
||||
fadein: fadein,
|
||||
fadeout: null,
|
||||
tight : tight,
|
||||
tight: tight,
|
||||
file: file,
|
||||
filter : renpyAudio.getFilter(afid),
|
||||
synchro_start : synchro_start,
|
||||
filter: renpyAudio.getFilter(afid),
|
||||
synchro_start: synchro_start,
|
||||
};
|
||||
|
||||
function reuseBuffer(c) {
|
||||
@@ -868,7 +868,7 @@ renpyAudio.read_video = (channel, video_tex, width, height) => {
|
||||
|
||||
if (DEBUG_OUT) {
|
||||
// DEBUG Dumps all method calls to renpyAudio
|
||||
renpyAudio._nodump = {'queue_depth': 1, 'playing_name': 1, 'video_ready': 1, 'read_video': 1};
|
||||
renpyAudio._nodump = { 'queue_depth': 1, 'playing_name': 1, 'video_ready': 1, 'read_video': 1 };
|
||||
renpyAudio = new Proxy(renpyAudio, {
|
||||
get(target, prop) {
|
||||
const origMethod = target[prop];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
/* Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation files
|
||||
@@ -20,7 +20,7 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
let afidToFilter = {0 : null};
|
||||
let afidToFilter = { 0: null };
|
||||
|
||||
/**
|
||||
* Given an afid, return the filter associated with it. Returns null if the
|
||||
@@ -94,7 +94,7 @@ renpyAudio.disconnectFilter = function (filter, source, destination) {
|
||||
}
|
||||
|
||||
|
||||
renpyAudio.filter = { }
|
||||
renpyAudio.filter = {}
|
||||
let filter = renpyAudio.filter;
|
||||
|
||||
/**
|
||||
@@ -112,7 +112,7 @@ filter.filterToFilter = function (filter1, filter2) {
|
||||
/**
|
||||
* Connects a filter to a node.
|
||||
*/
|
||||
filter.filterToNode = function(filter, node) {
|
||||
filter.filterToNode = function (filter, node) {
|
||||
for (let output of filter.outputs) {
|
||||
output.connect(node);
|
||||
}
|
||||
@@ -121,22 +121,22 @@ filter.filterToNode = function(filter, node) {
|
||||
/**
|
||||
* Connects a node to a filter.
|
||||
*/
|
||||
filter.nodeToFilter = function(node, filter) {
|
||||
filter.nodeToFilter = function (node, filter) {
|
||||
for (let input of filter.inputs) {
|
||||
node.connect(input);
|
||||
}
|
||||
}
|
||||
|
||||
filter.Null = function() {
|
||||
filter.Null = function () {
|
||||
let node = new GainNode(renpyAudio.context, { gain: 1 });
|
||||
|
||||
return {
|
||||
inputs: [ node ],
|
||||
outputs: [ node ],
|
||||
inputs: [node],
|
||||
outputs: [node],
|
||||
};
|
||||
}
|
||||
|
||||
filter.Crossfade = function(afid1, afid2, t) {
|
||||
filter.Crossfade = function (afid1, afid2, t) {
|
||||
let filter1 = renpyAudio.getFilter(afid1);
|
||||
let filter2 = renpyAudio.getFilter(afid2);
|
||||
|
||||
@@ -150,13 +150,13 @@ filter.Crossfade = function(afid1, afid2, t) {
|
||||
gain2.gain.linearRampToValueAtTime(1, renpyAudio.context.currentTime + t);
|
||||
|
||||
return {
|
||||
inputs: [ ...filter1.inputs, ...filter2.inputs ],
|
||||
inputs: [...filter1.inputs, ...filter2.inputs],
|
||||
outputs: [gain1, gain2],
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
filter.Biquad = function(kind, frequency, Q, gain) {
|
||||
filter.Biquad = function (kind, frequency, Q, gain) {
|
||||
let node = new BiquadFilterNode(renpyAudio.context, {
|
||||
type: kind,
|
||||
frequency: frequency,
|
||||
@@ -170,7 +170,7 @@ filter.Biquad = function(kind, frequency, Q, gain) {
|
||||
};
|
||||
};
|
||||
|
||||
filter.Sequence = function(...filters) {
|
||||
filter.Sequence = function (...filters) {
|
||||
let first = filters[0];
|
||||
let last = filters[filters.length - 1];
|
||||
|
||||
@@ -184,7 +184,7 @@ filter.Sequence = function(...filters) {
|
||||
};
|
||||
}
|
||||
|
||||
filter.Mix = function(...filters) {
|
||||
filter.Mix = function (...filters) {
|
||||
let inputs = [];
|
||||
let outputs = [];
|
||||
|
||||
@@ -199,7 +199,7 @@ filter.Mix = function(...filters) {
|
||||
};
|
||||
}
|
||||
|
||||
filter.Multiply = function(factor) {
|
||||
filter.Multiply = function (factor) {
|
||||
let node = new GainNode(renpyAudio.context, { gain: factor });
|
||||
|
||||
return {
|
||||
@@ -209,7 +209,7 @@ filter.Multiply = function(factor) {
|
||||
}
|
||||
|
||||
|
||||
filter.Delay = function(delay) {
|
||||
filter.Delay = function (delay) {
|
||||
|
||||
if (typeof delay !== "number") {
|
||||
delay = delay[0];
|
||||
@@ -223,7 +223,7 @@ filter.Delay = function(delay) {
|
||||
};
|
||||
}
|
||||
|
||||
filter.Comb = function(delay, child, multiplier, wet) {
|
||||
filter.Comb = function (delay, child, multiplier, wet) {
|
||||
if (typeof delay !== "number") {
|
||||
delay = delay[0];
|
||||
}
|
||||
@@ -237,8 +237,8 @@ filter.Comb = function(delay, child, multiplier, wet) {
|
||||
multiplierNode.connect(delayNode);
|
||||
|
||||
let rv = {
|
||||
inputs: [ delayNode ],
|
||||
outputs: [ multiplierNode ],
|
||||
inputs: [delayNode],
|
||||
outputs: [multiplierNode],
|
||||
};
|
||||
|
||||
if (wet) {
|
||||
@@ -252,7 +252,7 @@ filter.Comb = function(delay, child, multiplier, wet) {
|
||||
}
|
||||
|
||||
|
||||
filter.WetDry = function(child, wet, dry) {
|
||||
filter.WetDry = function (child, wet, dry) {
|
||||
let wetNode = new GainNode(renpyAudio.context, { gain: wet });
|
||||
let dryNode = new GainNode(renpyAudio.context, { gain: dry });
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# Copyright 2004-2024 Tom Rothamel <pytom@bishoujo.us>
|
||||
# Copyright 2004-2025 Tom Rothamel <pytom@bishoujo.us>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
||||
Reference in New Issue
Block a user