mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
audio/mp3: Move L3_Frequency_Inversion to Go
This commit is contained in:
parent
91c022dcda
commit
9e002e3e52
@ -52,6 +52,15 @@ func L3_Hybrid_Synthesis(gr C.unsigned, ch C.unsigned) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//export L3_Frequency_Inversion
|
||||||
|
func L3_Frequency_Inversion(gr C.unsigned, ch C.unsigned) {
|
||||||
|
for sb := 1; sb < 32; sb += 2 { //OPT? : for(sb = 18; sb < 576; sb += 36)
|
||||||
|
for i := 1; i < 18; i += 2 {
|
||||||
|
C.g_main_data.is[gr][ch][sb*18+i] = -C.g_main_data.is[gr][ch][sb*18+i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
g_synth_n_win = [64][32]float32{}
|
g_synth_n_win = [64][32]float32{}
|
||||||
v_vec = [2][1024]float32{}
|
v_vec = [2][1024]float32{}
|
||||||
|
@ -45,7 +45,6 @@ static void audio_write_raw(unsigned *samples,unsigned nsamples);
|
|||||||
static void Decode_L3_Init_Song(void);
|
static void Decode_L3_Init_Song(void);
|
||||||
static void Error(const char *s,int e);
|
static void Error(const char *s,int e);
|
||||||
static void L3_Antialias(unsigned gr,unsigned ch);
|
static void L3_Antialias(unsigned gr,unsigned ch);
|
||||||
static void L3_Frequency_Inversion(unsigned gr,unsigned ch);
|
|
||||||
static void L3_Requantize(unsigned gr,unsigned ch);
|
static void L3_Requantize(unsigned gr,unsigned ch);
|
||||||
static void L3_Reorder(unsigned gr,unsigned ch);
|
static void L3_Reorder(unsigned gr,unsigned ch);
|
||||||
static void L3_Stereo(unsigned gr);
|
static void L3_Stereo(unsigned gr);
|
||||||
@ -459,20 +458,6 @@ static void L3_Antialias(unsigned gr,unsigned ch){
|
|||||||
return; /* Done */
|
return; /* Done */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**Description: TBD
|
|
||||||
* Parameters: TBD
|
|
||||||
* Return value: TBD
|
|
||||||
* Author: Krister Lagerström(krister@kmlager.com) **/
|
|
||||||
static void L3_Frequency_Inversion(unsigned gr,unsigned ch){
|
|
||||||
unsigned sb,i;
|
|
||||||
|
|
||||||
for(sb = 1; sb < 32; sb += 2) { //OPT? : for(sb = 18; sb < 576; sb += 36)
|
|
||||||
for(i = 1; i < 18; i += 2)
|
|
||||||
g_main_data.is[gr][ch][sb*18 + i] = -g_main_data.is[gr][ch][sb*18 + i];
|
|
||||||
}
|
|
||||||
return; /* Done */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**Description: TBD
|
/**Description: TBD
|
||||||
* Parameters: TBD
|
* Parameters: TBD
|
||||||
* Return value: TBD
|
* Return value: TBD
|
||||||
|
@ -100,6 +100,7 @@ static int Read_Header(void);
|
|||||||
void Read_Huffman(unsigned part_2_start,unsigned gr,unsigned ch);
|
void Read_Huffman(unsigned part_2_start,unsigned gr,unsigned ch);
|
||||||
|
|
||||||
void L3_Hybrid_Synthesis(unsigned gr,unsigned ch);
|
void L3_Hybrid_Synthesis(unsigned gr,unsigned ch);
|
||||||
|
void L3_Frequency_Inversion(unsigned gr,unsigned ch);
|
||||||
void L3_Subband_Synthesis(unsigned gr,unsigned ch, unsigned* outdata);
|
void L3_Subband_Synthesis(unsigned gr,unsigned ch, unsigned* outdata);
|
||||||
|
|
||||||
int Read_CRC(void);
|
int Read_CRC(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user