abstract class GBA::SoundChannel

Direct Known Subclasses

Defined in:

crab/gba/apu/abstract_channels.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(gba : GBA) #

[View source]

Instance Method Detail

abstract def ===(other) #

Used so that channels can be matched with case..when statements


[View source]
abstract def [](address : UInt32) : UInt8 #

[View source]
abstract def []=(address : UInt32, value : UInt8) : Nil #

[View source]
def enabled : Bool #

[View source]
def enabled=(enabled : Bool) #

[View source]
abstract def frequency_timer : UInt32 #

Calculate the frequency timer


[View source]
abstract def get_amplitude : Int16 #

[View source]
def length_counter : Int32 #

NRx1


[View source]
def length_counter=(length_counter : Int32) #

NRx1


[View source]
def length_step : Nil #

Step the length, disabling the channel if the length counter expires


[View source]
abstract def schedule_reload(frequency_timer : UInt32) : Nil #

[View source]
def step : Nil #

Step the channel, calling helpers to reload the period and step the wave generation


[View source]
abstract def step_wave_generation : Nil #

Called when @period reaches 0


[View source]