File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ extern crate libc;
22extern crate sndio_sys;
33
44mod adapters;
5- mod endian;
65mod runner;
76use self :: adapters:: { input_adapter_callback, output_adapter_callback} ;
87use self :: runner:: runner;
@@ -44,6 +43,12 @@ pub enum SndioError {
4443 BackendSpecific ( BackendSpecificError ) ,
4544}
4645
46+ #[ cfg( target_endian = "big" ) ]
47+ const IS_LITTLE_ENDIAN : u32 = 0 ;
48+
49+ #[ cfg( target_endian = "little" ) ]
50+ const IS_LITTLE_ENDIAN : u32 = 1 ;
51+
4752impl From < SndioError > for BuildStreamError {
4853 fn from ( e : SndioError ) -> BuildStreamError {
4954 match e {
@@ -216,10 +221,7 @@ impl InnerState {
216221 // Use I16 at 48KHz; mono playback & record
217222 par. bits = 16 ;
218223 par. sig = 1 ;
219- par. le = match endian:: get_endianness ( ) {
220- endian:: Endian :: BE => 0 ,
221- endian:: Endian :: LE => 1 ,
222- } ; // Native byte order
224+ par. le = IS_LITTLE_ENDIAN ; // Native byte order
223225 par. rchan = 1 ; // mono record
224226 par. pchan = 1 ; // mono playback
225227 par. rate = rate. 0 ;
You can’t perform that action at this time.
0 commit comments