Struct vtx::Vtx

source ·
pub struct Vtx {
    pub chip: SoundChip,
    pub stereo: Stereo,
    pub frequency: u32,
    pub player_frequency: u8,
    pub loop_start_frame: u16,
    pub year: u16,
    pub title: String,
    pub author: String,
    pub from: String,
    pub tracker: String,
    pub comment: String,
    pub frame_data: Vec<u8>,
}

Fields§

§chip: SoundChip

Sound chip which should be used for this track

§stereo: Stereo

Stereo configuration of the track

§frequency: u32

Sound chip frequency (e.g. For ZX Spectrum it is usually 1773400 Hz)

§player_frequency: u8

Sound frames per second (e.g. For ZX Spectrum usually equals to 50)

§loop_start_frame: u16

Starting frame index for looped playback (e.g. 0 - beginning of the song)

§year: u16

Year of the track

§title: String

Title of the track

§author: String

Author of the track

§from: String

Source of the song (e.g. In which game was used)

§tracker: String

Tracker program used to make this song

§comment: String

Author comment

§frame_data: Vec<u8>

Stores sequential blocks of register values for each frame. Each block has size if AY_REGISTER_COUNT. It is advised to use frame_registers to access frame data instead of direct access to frame_data field

Implementations§

source§

impl Vtx

source

pub fn load<R>(reader: R) -> Result<Self, VtxError>where R: Read + Seek,

Loads VTX file using provided reader

Trait Implementations§

source§

impl Debug for Vtx

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for Vtx

§

impl Send for Vtx

§

impl Sync for Vtx

§

impl Unpin for Vtx

§

impl UnwindSafe for Vtx

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.