abstract class GB::SoundChannel

Direct Known Subclasses

Defined in:

crab/gb/apu/abstract_channels.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(gb : GB) #

[View source]

Instance Method Detail

abstract def ===(other) #

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


[View source]
abstract def [](index : Int) : UInt8 #

[View source]
abstract def []=(index : Int, 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 : Float32 #

[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]