pub fn from_static_bytes(buf: &'static [u8]) -> Result<Music<'static>, String> {
        let rw = unsafe {
            sys::SDL_RWFromConstMem(buf.as_ptr() as *const c_void, buf.len() as c_int)
        };

        if rw.is_null() {
            return Err(get_error());
        }

        let raw = unsafe { sys::mixer::Mix_LoadMUS_RW(rw, 0) };
        if raw.is_null() {
            Err(get_error())
        } else {
            Ok(Music {
                raw: raw,
                owned: true,
                _marker: PhantomData,
            })
        }
    }
/// Load music from a static byte buffer.
Load music from a static byte buffer.
Load music from a static byte buffer .
pub fn from_static_bytes(buf: &'static [u8]) -> Result<Music<'static>, String> {
        let rw = unsafe {
            sys::SDL_RWFromConstMem(buf.as_ptr() as *const c_void, buf.len() as c_int)
        };
        if rw.is_null() {
            return Err(get_error());
        }
        let raw = unsafe { sys::mixer::Mix_LoadMUS_RW(rw, 0) };
        if raw.is_null() {
            Err(get_error())
        } else {
            Ok(Music {
                raw: raw,
                owned: true,
                _marker: PhantomData,
            })
        }
    }
pub fn from_static_bytes ( buf : & ' static [ u8 ] ) -> Result < Music < ' static > , String > { let rw = unsafe { sys :: SDL_RWFromConstMem ( buf . as_ptr ( ) as * const c_void , buf . len ( ) as c_int ) } ; if rw . is_null ( ) { return Err ( get_error ( ) ) ; } let raw = unsafe { sys :: mixer :: Mix_LoadMUS_RW ( rw , 0 ) } ; if raw . is_null ( ) { Err ( get_error ( ) ) } else { Ok ( Music { raw : raw , owned : true , _marker : PhantomData , } ) } }
Load music from a static byte buffer.
Load music from a static byte buffer .
buf
&'static [u8]
buf
&'static [u8]