mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
support custom audioContext sample rate
This commit is contained in:
parent
a38eb58613
commit
7ea0bae9a6
@ -27,6 +27,7 @@ const gradualFadeMs = 150
|
|||||||
|
|
||||||
// TODO: Check if source playing is a stream. Also handle if it's a stream resuming after a pause will seek to the last position
|
// TODO: Check if source playing is a stream. Also handle if it's a stream resuming after a pause will seek to the last position
|
||||||
export default class Player extends Core {
|
export default class Player extends Core {
|
||||||
|
static dependencies = ["settings"]
|
||||||
static refName = "player"
|
static refName = "player"
|
||||||
|
|
||||||
static namespace = "player"
|
static namespace = "player"
|
||||||
@ -35,7 +36,9 @@ export default class Player extends Core {
|
|||||||
|
|
||||||
currentDomWindow = null
|
currentDomWindow = null
|
||||||
|
|
||||||
audioContext = new AudioContext()
|
audioContext = new AudioContext({
|
||||||
|
sampleRate: app.cores.settings.get("player.sample_rate") ?? 192000
|
||||||
|
})
|
||||||
|
|
||||||
bufferLoadQueue = []
|
bufferLoadQueue = []
|
||||||
bufferLoadQueueLoading = false
|
bufferLoadQueueLoading = false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user