- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
for( i=0; i<MAX_CHANNELS; i++ )
{
ht->ht_Voices[i].vc_Delta=1;
ht->ht_Voices[i].vc_OverrideTranspose=1000; // 1.5
ht->ht_Voices[i].vc_SamplePos=ht->ht_Voices[i].vc_Track=ht->ht_Voices[i].vc_Transpose=ht->ht_Voices[i].vc_NextTrack = ht->ht_Voices[i].vc_NextTranspose = 0;
ht->ht_Voices[i].vc_ADSRVolume=ht->ht_Voices[i].vc_InstrPeriod=ht->ht_Voices[i].vc_TrackPeriod=ht->ht_Voices[i].vc_VibratoPeriod=ht->ht_Voices[i].vc_NoteMaxVolume=ht->ht_Voices[i].vc_PerfSubVolume=ht->ht_Voices[i].vc_TrackMasterVolume=0;
ht->ht_Voices[i].vc_NewWaveform=ht->ht_Voices[i].vc_Waveform=ht->ht_Voices[i].vc_PlantSquare=ht->ht_Voices[i].vc_PlantPeriod=ht->ht_Voices[i].vc_IgnoreSquare=0;
ht->ht_Voices[i].vc_TrackOn=ht->ht_Voices[i].vc_FixedNote=ht->ht_Voices[i].vc_VolumeSlideUp=ht->ht_Voices[i].vc_VolumeSlideDown=ht->ht_Voices[i].vc_HardCut=ht->ht_Voices[i].vc_HardCutRelease=ht->ht_Voices[i].vc_HardCutReleaseF=0;
ht->ht_Voices[i].vc_PeriodSlideSpeed=ht->ht_Voices[i].vc_PeriodSlidePeriod=ht->ht_Voices[i].vc_PeriodSlideLimit=ht->ht_Voices[i].vc_PeriodSlideOn=ht->ht_Voices[i].vc_PeriodSlideWithLimit=0;
ht->ht_Voices[i].vc_PeriodPerfSlideSpeed=ht->ht_Voices[i].vc_PeriodPerfSlidePeriod=ht->ht_Voices[i].vc_PeriodPerfSlideOn=ht->ht_Voices[i].vc_VibratoDelay=ht->ht_Voices[i].vc_VibratoCurrent=ht->ht_Voices[i].vc_VibratoDepth=ht->ht_Voices[i].vc_VibratoSpeed=0;
ht->ht_Voices[i].vc_SquareOn=ht->ht_Voices[i].vc_SquareInit=ht->ht_Voices[i].vc_SquareLowerLimit=ht->ht_Voices[i].vc_SquareUpperLimit=ht->ht_Voices[i].vc_SquarePos=ht->ht_Voices[i].vc_SquareSign=ht->ht_Voices[i].vc_SquareSlidingIn=ht->ht_Voices[i].vc_SquareReverse=0;
ht->ht_Voices[i].vc_FilterOn=ht->ht_Voices[i].vc_FilterInit=ht->ht_Voices[i].vc_FilterLowerLimit=ht->ht_Voices[i].vc_FilterUpperLimit=ht->ht_Voices[i].vc_FilterPos=ht->ht_Voices[i].vc_FilterSign=ht->ht_Voices[i].vc_FilterSpeed=ht->ht_Voices[i].vc_FilterSlidingIn=ht->ht_Voices[i].vc_IgnoreFilter=0;
ht->ht_Voices[i].vc_PerfCurrent=ht->ht_Voices[i].vc_PerfSpeed=ht->ht_Voices[i].vc_WaveLength=ht->ht_Voices[i].vc_NoteDelayOn=ht->ht_Voices[i].vc_NoteCutOn=0;
ht->ht_Voices[i].vc_AudioPeriod=ht->ht_Voices[i].vc_AudioVolume=ht->ht_Voices[i].vc_VoiceVolume=ht->ht_Voices[i].vc_VoicePeriod=ht->ht_Voices[i].vc_VoiceNum=ht->ht_Voices[i].vc_WNRandom=0;
ht->ht_Voices[i].vc_SquareWait=ht->ht_Voices[i].vc_FilterWait=ht->ht_Voices[i].vc_PerfWait=ht->ht_Voices[i].vc_NoteDelayWait=ht->ht_Voices[i].vc_NoteCutWait=0;
ht->ht_Voices[i].vc_PerfList=0;
ht->ht_Voices[i].vc_RingSamplePos=ht->ht_Voices[i].vc_RingDelta=ht->ht_Voices[i].vc_RingPlantPeriod=ht->ht_Voices[i].vc_RingAudioPeriod=ht->ht_Voices[i].vc_RingNewWaveform=ht->ht_Voices[i].vc_RingWaveform=ht->ht_Voices[i].vc_RingFixedPeriod=ht->ht_Voices[i].vc_RingBasePeriod=0;
ht->ht_Voices[i].vc_RingMixSource = NULL;
ht->ht_Voices[i].vc_RingAudioSource = NULL;
memset(&ht->ht_Voices[i].vc_SquareTempBuffer,0,0x80);
memset(&ht->ht_Voices[i].vc_ADSR,0,sizeof(struct hvl_envelope));
memset(&ht->ht_Voices[i].vc_VoiceBuffer,0,0x281);
memset(&ht->ht_Voices[i].vc_RingVoiceBuffer,0,0x281);
}
dwarf_with_beer 03.02.2013 18:26 # 0
krypt 03.02.2013 19:12 # 0
dwarf_with_beer 03.02.2013 19:19 # 0
memset(&ht->ht_Voices[i].vc_ADSR,0,sizeof(struct hvl_envelope));
memset(&ht->ht_Voices[i].vc_VoiceBuffer,0,0x281);
memset(&ht->ht_Voices[i].vc_RingVoiceBuffer,0,0x281);
я думаю это массивы
Govnocoder#0xFF 03.02.2013 19:25 # 0
krypt 03.02.2013 19:49 # 0
https://github.com/kode54/foo_input_hvl/blob/master/hvl_replay.h
Там в заголовке видно, что внутри есть указатели, и просто так написать memset нельзя. Другой вопрос, что и этот код выглядит странно (помимо говна с заполнением нулями и нулевой читаемостью), ибо указатели просто обнуляются, а память не освобождается.
dwarf_with_beer 03.02.2013 20:05 # 0
krypt 04.02.2013 01:43 # +1
dwarf_with_beer 04.02.2013 08:54 # 0
Ccik 04.02.2013 15:17 # 0
bormand 04.02.2013 09:14 # +3
dwarf_with_beer 04.02.2013 10:36 # 0
krypt 03.02.2013 19:52 # 0
https://github.com/kode54/foo_input_hvl/blob/master/hvl_replay.c
Этот код из функции на 256й строке