export function safeAddSound(scene, key, config) {
    if (!scene.cache.audio.has(key)) {
        return undefined;
    }
    try {
        return scene.sound.add(key, config);
    }
    catch {
        return undefined;
    }
}
