mirror of
https://github.com/RustAudio/rodio
synced 2024-12-14 06:02:31 +00:00
Update to lewton 0.5
This commit is contained in:
parent
b1a560eb41
commit
89635a3f71
3 changed files with 2 additions and 6 deletions
|
@ -14,5 +14,4 @@ cpal = "0.4.0"
|
||||||
futures = "0.1.1"
|
futures = "0.1.1"
|
||||||
hound = "1.0.0"
|
hound = "1.0.0"
|
||||||
lazy_static = "0.1.12"
|
lazy_static = "0.1.12"
|
||||||
lewton = "0.4"
|
lewton = "0.5"
|
||||||
ogg = "0.4"
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ use std::vec;
|
||||||
use Source;
|
use Source;
|
||||||
|
|
||||||
use lewton::inside_ogg::OggStreamReader;
|
use lewton::inside_ogg::OggStreamReader;
|
||||||
use ogg;
|
|
||||||
|
|
||||||
/// Decoder for an OGG file that contains Vorbis sound format.
|
/// Decoder for an OGG file that contains Vorbis sound format.
|
||||||
pub struct VorbisDecoder<R>
|
pub struct VorbisDecoder<R>
|
||||||
|
@ -20,8 +19,7 @@ impl<R> VorbisDecoder<R>
|
||||||
{
|
{
|
||||||
/// Attempts to decode the data as ogg/vorbis.
|
/// Attempts to decode the data as ogg/vorbis.
|
||||||
pub fn new(data: R) -> Result<VorbisDecoder<R>, ()> {
|
pub fn new(data: R) -> Result<VorbisDecoder<R>, ()> {
|
||||||
let packet_reader = ogg::PacketReader::new(data);
|
let mut stream_reader = match OggStreamReader::new(data) {
|
||||||
let mut stream_reader = match OggStreamReader::new(packet_reader) {
|
|
||||||
Err(_) => return Err(()),
|
Err(_) => return Err(()),
|
||||||
Ok(r) => r,
|
Ok(r) => r,
|
||||||
};
|
};
|
||||||
|
|
|
@ -86,7 +86,6 @@ extern crate hound;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate lazy_static;
|
extern crate lazy_static;
|
||||||
extern crate lewton;
|
extern crate lewton;
|
||||||
extern crate ogg;
|
|
||||||
|
|
||||||
pub use cpal::{Endpoint, get_endpoints_list, get_default_endpoint};
|
pub use cpal::{Endpoint, get_endpoints_list, get_default_endpoint};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue