n_synfreevoice

This commit is contained in:
ProjectRevoTPP
2024-09-14 21:36:51 -04:00
parent feb2d0c9aa
commit c767dabdc5
4 changed files with 54 additions and 5 deletions

View File

@@ -1468,7 +1468,7 @@ n_alSynAllocFX = 0x8004FDA0; // type:func
func_8004FE00 = 0x8004FE00; // type:func
func_8004FF20 = 0x8004FF20; // type:func
n_alSynStartVoiceParams = 0x8004FF40; // type:func
func_80050020 = 0x80050020; // type:func
n_alSynFreeVoice = 0x80050020; // type:func
n_alFxPull = 0x800500C0; // type:func
n_alFxParamHdl = 0x800503A0; // type:func
_n_loadOutputBuffer = 0x80050600; // type:func

View File

@@ -1,3 +0,0 @@
#include "global.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/50C20/func_80050020.s")

View File

@@ -0,0 +1,52 @@
/*====================================================================
*
* Copyright 1993, Silicon Graphics, Inc.
* All Rights Reserved.
*
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
* Inc.; the contents of this file may not be disclosed to third
* parties, copied or duplicated in any form, in whole or in part,
* without the prior written permission of Silicon Graphics, Inc.
*
* RESTRICTED RIGHTS LEGEND:
* Use, duplication or disclosure by the Government is subject to
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
* in Technical Data and Computer Software clause at DFARS
* 252.227-7013, and/or in similar or successor clauses in the FAR,
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
* Copyright Laws of the United States.
*====================================================================*/
#include <ultraerror.h>
#include <os_internal.h>
#include <os.h>
#include "n_synthInternals.h"
void n_alSynFreeVoice(N_ALVoice *voice)
{
ALFilter *f;
N_ALFreeParam *update;
if (voice->pvoice) {
if (voice->pvoice->offset) { /* if voice was stolen */
update = (N_ALFreeParam *)__n_allocParam();
ALFailIf(update == 0, ERR_ALSYN_NO_UPDATE);
/*
* set voice data
*/
#ifdef SAMPLE_ROUND
update->delta = SAMPLE184( n_syn->paramSamples + voice->pvoice->offset);
#else
update->delta = n_syn->paramSamples + voice->pvoice->offset;
#endif
update->type = AL_FILTER_FREE_VOICE;
update->pvoice = voice->pvoice;
n_alEnvmixerParam(voice->pvoice, AL_FILTER_ADD_UPDATE, update);
} else {
_n_freePVoice(voice->pvoice);
}
voice->pvoice = 0;
}
}

View File

@@ -116,7 +116,7 @@
- [0x509A0, c, libnaudio/n_synallocfx]
- [0x50A00, c]
- [0x50B40, c, libnaudio/n_synstartvoiceparam]
- [0x50C20, c]
- [0x50C20, c, libnaudio/n_synfreevoice]
- [0x50CC0, c, libnaudio/n_reverb]
- [0x51740, c]
- [0x517A0, c] # yay0 audio decoder