File tree Expand file tree Collapse file tree 2 files changed +7
-19
lines changed Expand file tree Collapse file tree 2 files changed +7
-19
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ extern crate libc;
2
2
extern crate sndio_sys;
3
3
4
4
mod adapters;
5
- mod endian;
6
5
mod runner;
7
6
use self :: adapters:: { input_adapter_callback, output_adapter_callback} ;
8
7
use self :: runner:: runner;
@@ -44,6 +43,12 @@ pub enum SndioError {
44
43
BackendSpecific ( BackendSpecificError ) ,
45
44
}
46
45
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
+
47
52
impl From < SndioError > for BuildStreamError {
48
53
fn from ( e : SndioError ) -> BuildStreamError {
49
54
match e {
@@ -216,10 +221,7 @@ impl InnerState {
216
221
// Use I16 at 48KHz; mono playback & record
217
222
par. bits = 16 ;
218
223
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
223
225
par. rchan = 1 ; // mono record
224
226
par. pchan = 1 ; // mono playback
225
227
par. rate = rate. 0 ;
You can’t perform that action at this time.
0 commit comments