Files
2026-07-28 01:06:53 +03:00

77 lines
4.2 KiB
TypeScript

/* Metro module 10756; source: modules/sound_playback/SoundUtils.tsx; dependencies: [10757, 3996, 8900, 3, 10759, 10760, 2] */
import Logger from '../debug/Logger.tsx'; /* Metro dependency 3 */
import StreamerModeStore from '../../stores/StreamerModeStore.tsx'; /* Metro dependency 3996 */
import SoundpackStore from '../soundpacks/SoundpackStore.tsx'; /* Metro dependency 10757 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from './Constants.tsx'; /* Metro dependency 8900 */
import * as SoundUtilsModule from './native/SoundUtils.tsx'; /* Metro dependency 10760 */
function _fun82740(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10942:6, offset: 0x01f004d5, size: 228 bytes, params: 8, frame: 20
const env0_0 = require;
const createSound2 = createSound;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = Logger;
value = new value('SoundUtils');
(FileImportTrackerModule).fileFinishedImporting('modules/sound_playback/SoundUtils.tsx');
exports.createSoundForPack = function(a0, a1) {
var value = a0;
var value2 = a2;
var value3 = a3;
return createSound(importDefault(dependencyMap[4])(a1)[value] ?? value, value,
value2 !== undefined ? value2 : 1,
value3 !== undefined ? value3 : SoundOutputChannel.DEFAULT);
};
exports.createSound = createSound2;
exports.playSound = playSound_82743;
function createSound(a0, a1) { // fn#82741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10942:174, offset: 0x01f005b9, size: 107 bytes, params: 3, frame: 19
let value = a2;
const value2 = a3;
const value3 = a4;
const r6 = value !== undefined ? value : 1;
const r5 = value2 !== undefined ? value2 : SoundOutputChannel.DEFAULT;
const r4 = value3 !== undefined ? value3 : false;
const MobileAudioSound = (SoundUtilsModule).MobileAudioSound;
value = Object.create(MobileAudioSound.prototype, {constructor: {value: MobileAudioSound}});
const mobileAudioSound = new MobileAudioSound(a0, a1, r6, r5, r4);
return mobileAudioSound instanceof Object ? mobileAudioSound : value;
}
function playSound_82743(a0) { // fn#82743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10942:509, offset: 0x01f0068e, size: 282 bytes, params: 2, frame: 26
let value = a0;
const value2 = a1;
const value3 = a3;
const value4 = undefined;
const r8 = value2 !== value4 ? value2 : 1;
const env0_0 = a2;
if (StreamerModeStore.disableSounds) {
return value4;
}
const value8 = (importDefault(10759) /* metro dependency 10759: getSoundsForPack */)(value3 ?? SoundpackStore.getSoundpack());
if (value8 == null) {
env0_6.log('Unable to find sound for pack name: ' + value3);
}
const createSoundBinding = createSound;
const r6 = value8[value] ?? value;
const r5 = (a4 == null ? value4 : a4.outputChannel) ?? SoundOutputChannel.DEFAULT;
const trackNotificationFailure = a4 == null ? value4 : a4.trackNotificationFailure;
value = createSoundBinding(r6, value, r8, r5, trackNotificationFailure != null && trackNotificationFailure);
if (a2 != null) {
value.playWithListener().then(_fun82744);
} else {
value.play();
}
return value;
function _fun82744(a0) { // fn#82744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10942:865, offset: 0x01d4a501, size: 23 bytes, params: 2, frame: 9
if (a0) {
importDefault();
}
}
}
}
global.__d(_fun82740, 10756, [10757, 3996, 8900, 3, 10759, 10760,
2]) /* metro module 10756, dependencies: [10757, 3996, 8900, 3, 10759, 10760, 2] */;