# Crate claxon [−] [src]

Claxon, a FLAC decoding library.

# Examples

The following example computes the root mean square (RMS) of an audio file with at most 16 bits per sample.

use claxon; let mut reader = claxon::FlacReader::open("testsamples/pop.flac").unwrap(); let mut sqr_sum = 0.0; let mut count = 0; for sample in reader.samples::<i16>() { let s = sample.unwrap() as f64; sqr_sum += s * s; count += 1; } println!("RMS is {}", (sqr_sum / count as f64).sqrt());

TODO: more examples.

## Modules

frame |
The |

metadata |
The |

sample |
The |

subframe |
The |

## Structs

FlacReader |
A FLAC decoder that can decode the stream from the underlying reader. |

FlacSamples |
An iterator that yields samples of type |

## Enums

Error |
An error that prevents succesful decoding of the FLAC stream. |

## Type Definitions

Result |
A type for results generated by Claxon where the error type is hard-wired. |