-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apu: Add VP debug output #28
base: master
Are you sure you want to change the base?
Conversation
#endif | ||
|
||
#if (PLAYBACK_VP_BINS_MASK > 0) || (DUMP_VP_BINS_MASK > 0) | ||
void initialize_audio_debugger(MCPXAPUState *d) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style is <object>_<verb>
; also init
?
|
||
#if DUMP_VP_BINS_MASK > 0 | ||
MCPX_APU_DPRINTF("mcpx frame ping\n"); | ||
for (int i = 0; i < NUM_MIXBINS; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C99 not allowed
#if PLAYBACK_VP_BINS_MASK > 0 | ||
/* Output will be S32 mono; mix this now */ | ||
int32_t mixed[NUM_SAMPLES_PER_FRAME] = { 0 }; | ||
for (int i = 0; i < NUM_MIXBINS; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C99 not allowed
// AUD_set_active_out(d->vp_bins_out, 1); //FIXME: Why does this hang GTK UI? | ||
#endif | ||
#if DUMP_VP_BINS_MASK > 0 | ||
for (unsigned int i = 0; i < NUM_MIXBINS; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C99 not allowed
535bc5c
to
4384bef
Compare
This PR adds debug routing options for the VP audio output.
On hardware, the VP is hardwired to output to the GP in a fixed and known format. We already have a framework for calculating VP audio, we can just take this 32 channel audio and re-route it. Options are:
QEMU audio card (1x mono audio output)
This adds a QEMU Audio card for the MCPX APU, with an output for the VP.
In reality APU shouldn't be an audio-card as it has no physical audio outputs (it just does audio processing; output is done by ACI) - so this is only a debug interface.
As QEMU audio is fed to speakers in realtime, any gaps in the playback will cause audible gaps in the audio. Any buffer overrun will drop packets or add audio latency.
File-output (32x mono audio output)
This custom debug function exists, because the
wavcapture
QMP command only supports resampled mono or stereo output.However, for debugging we want to preserve the original data of all 32 channels, without audio gaps or resampling.
The file output provides this continuous raw audio data without gaps.
There's a script to convert the binary APU audio dumps to audible wav files.
TODO: