GBA
mmVBlank

Back to Index

Prototype

void mmVblank( void )

Description

This function must be linked directly to the VBlank IRQ. During this function, the sound DMA is reset. The timing is extremely critical, so make sure that it is not interrupted, otherwise garbage may be heard in the output.

If you need another function to execute after this process is finished, use mmVBlankReturn to install a your handler.

Example setup with libgba system

void setup_interrupts( void )
{
    irqInit();
    irqSet( IRQ_VBLANK, mmVBlank );
    irqEnable( IRQ_VBLANK );

    mmVBlankReturn( myVBlankHandler ); // this is optional
}

See Also

mmVBlankReturn