mirror of
https://github.com/libretro/Mu.git
synced 2026-02-14 13:45:21 +00:00
More audio info
This commit is contained in:
BIN
bugs/properPwmSineWave.png
Normal file
BIN
bugs/properPwmSineWave.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
@@ -24,6 +24,7 @@ RxOverflow on SPI1, don't know if back or front of FIFO is overwritten on overfl
|
||||
ICR POL(1,2,3,6) may flip the pin value as well as the interrupt, POL5 does not flip the INT5 pin though, this was confirmed with a hardware test(it doesnt seem to but there is instability on the pin when the SD card is plugged in, this may have to do with card detect also being a data line on the SD pinout)
|
||||
edge triggered INT* don't clear on write to ISR when masked in IMR(at least that seems to be the reason)
|
||||
if a sound interrupt is triggered while the button interrupt is disabled the button interrupt will still trigger(in galax game)
|
||||
PWM1 output value is not a direct range cast of 0<->255 to 0<->32767, its additive, see properPwmSineWave.png
|
||||
|
||||
Debug tools:
|
||||
ADS7846 channels can't be read in single reference mode in hwTestSuite
|
||||
|
||||
@@ -86,12 +86,10 @@ int32_t pwm1FifoRunSample(int32_t now, int32_t clockOffset){
|
||||
uint8_t clockDivider = 2 << (pwmc1 & 0x03);
|
||||
uint8_t repeat = 1 << (pwmc1 >> 2 & 0x03);
|
||||
int32_t audioStart = now + clockOffset;
|
||||
//int32_t audioNow = audioStart;
|
||||
int32_t audioSampleDuration = usingClk32 ? audioGetFramePercentIncrementFromClk32s(period * prescaler * clockDivider * repeat) : audioGetFramePercentIncrementFromSysclks(period * prescaler * clockDivider * repeat);
|
||||
int32_t audioDeew = dMin((double)sample / period, 1.0)/*dutyCycle*/ * AUDIO_AMPLITUDE;
|
||||
|
||||
blip_add_delta(palmAudioResampler, audioStart, audioDeew - pwm1LastSampleDelta);
|
||||
//audioNow += audioSampleDuration;
|
||||
pwm1LastSampleDelta = audioDeew;
|
||||
|
||||
//remove used entry
|
||||
|
||||
Reference in New Issue
Block a user