mirror of
https://github.com/encounter/rust-sdl2.git
synced 2026-07-10 21:18:41 -07:00
remove usage of owned ptr in audio.rs
This commit is contained in:
+2
-2
@@ -262,9 +262,9 @@ impl AudioDevice {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn open(device: Option<&str>, iscapture: int, spec: &AudioSpec) -> Result<(AudioDevice, ~AudioSpec), ~str> {
|
||||
pub fn open(device: Option<&str>, iscapture: int, spec: &AudioSpec) -> Result<(AudioDevice, AudioSpec), ~str> {
|
||||
//! SDL_OpenAudioDevice
|
||||
let obtained = ~unsafe { mem::uninit::<AudioSpec>() };
|
||||
let obtained = unsafe { mem::uninit::<AudioSpec>() };
|
||||
unsafe {
|
||||
let device_c_str = match device {
|
||||
None => ptr::null(),
|
||||
|
||||
Reference in New Issue
Block a user