fix: nhãn của soundfont hiển thị sai và không load được instrument
This commit is contained in:
@@ -66,6 +66,7 @@ window.API_BASE_URL = window.API_BASE_URL || window.location.origin;
|
||||
listDefaultSoundfonts: () => apiRequest('/api/v1/plugins/default-soundfonts', { method: 'GET' }),
|
||||
listSoundfontInstruments: (sfId) => apiRequest(`/api/v1/plugins/soundfont-instruments/${sfId}`, { method: 'GET' }),
|
||||
renderProject: (projectJson, outputFilename) => apiRequest('/api/v1/plugins/render', { method: 'POST', body: JSON.stringify({ project_json: projectJson, output_filename: outputFilename }) }),
|
||||
deleteSoundFont: (sfId) => apiRequest(`/api/v1/plugins/soundfont/${sfId}`, { method: 'DELETE' }),
|
||||
uploadSoundFont: async (file) => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
if (!window.__sharedAudioCtx) {
|
||||
window.__sharedAudioCtx = new (window.AudioContext || window.webkitAudioContext)();
|
||||
}
|
||||
if (window.__sharedAudioCtx.state === 'suspended') {
|
||||
window.__sharedAudioCtx.resume();
|
||||
}
|
||||
if (!__gainNode) {
|
||||
__gainNode = window.__sharedAudioCtx.createGain();
|
||||
__gainNode.gain.value = 0.3;
|
||||
|
||||
Reference in New Issue
Block a user