INNER CODE UNIT · TypeScript

actorIndex

LBALab/lba2remake · src/audio/index.ts:254

            actorIndex: number = -1,
            volume: number = state.config.soundFxVolume
        ) => {
            const sampleSource = createSampleSource(context, volume);
            sampleSource.play(index, frequency, loopCount);
            samples[index] = sampleSource;
            if (!samplesPerActor[actorIndex]) {
                samplesPerActor[actorIndex] = {};
            }
            samplesPerActor[actorIndex][index] = sampleSource;
            return sampleSource;
        },
        isPlayingSample: (index: number) => {
            const sampleSource = samples[index];
            if (sampleSource) {
                return sampleSource.isPlaying();
            }
            return false;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…