11//! Sound related commands for Neotron OS
22
3- use crate :: { osprint, osprintln, Ctx , API } ;
3+ use crate :: { bios , osprint, osprintln, Ctx , API } ;
44
55pub static MIXER_ITEM : menu:: Item < Ctx > = menu:: Item {
66 item_type : menu:: ItemType :: Callback {
@@ -53,7 +53,7 @@ fn mixer(_menu: &menu::Menu<Ctx>, item: &menu::Item<Ctx>, args: &[&str], _ctx: &
5353 let mut found = false ;
5454 for mixer_id in 0u8 ..=255u8 {
5555 match ( api. audio_mixer_channel_get_info ) ( mixer_id) {
56- neotron_common_bios :: FfiOption :: Some ( mixer_info) => {
56+ bios :: FfiOption :: Some ( mixer_info) => {
5757 if mixer_info. name . as_str ( ) == selected_mixer {
5858 if let Err ( e) =
5959 ( api. audio_mixer_channel_set_level ) ( mixer_id, level_int) . into ( )
@@ -70,7 +70,7 @@ fn mixer(_menu: &menu::Menu<Ctx>, item: &menu::Item<Ctx>, args: &[&str], _ctx: &
7070 break ;
7171 }
7272 }
73- neotron_common_bios :: FfiOption :: None => {
73+ bios :: FfiOption :: None => {
7474 break ;
7575 }
7676 }
@@ -84,11 +84,11 @@ fn mixer(_menu: &menu::Menu<Ctx>, item: &menu::Item<Ctx>, args: &[&str], _ctx: &
8484 osprintln ! ( "Mixers:" ) ;
8585 for mixer_id in 0u8 ..=255u8 {
8686 match ( api. audio_mixer_channel_get_info ) ( mixer_id) {
87- neotron_common_bios :: FfiOption :: Some ( mixer_info) => {
87+ bios :: FfiOption :: Some ( mixer_info) => {
8888 let dir_str = match mixer_info. direction {
89- neotron_common_bios :: audio:: Direction :: Input => "In" ,
90- neotron_common_bios :: audio:: Direction :: Loopback => "Loop" ,
91- neotron_common_bios :: audio:: Direction :: Output => "Out" ,
89+ bios :: audio:: Direction :: Input => "In" ,
90+ bios :: audio:: Direction :: Loopback => "Loop" ,
91+ bios :: audio:: Direction :: Output => "Out" ,
9292 } ;
9393 if selected_mixer
9494 . and_then ( |s| Some ( s == mixer_info. name . as_str ( ) ) )
@@ -104,7 +104,7 @@ fn mixer(_menu: &menu::Menu<Ctx>, item: &menu::Item<Ctx>, args: &[&str], _ctx: &
104104 ) ;
105105 }
106106 }
107- neotron_common_bios :: FfiOption :: None => {
107+ bios :: FfiOption :: None => {
108108 // Run out of mixers
109109 break ;
110110 }
@@ -117,7 +117,7 @@ fn play(_menu: &menu::Menu<Ctx>, _item: &menu::Item<Ctx>, args: &[&str], ctx: &m
117117 fn play_inner (
118118 file_name : & str ,
119119 scratch : & mut [ u8 ] ,
120- ) -> Result < ( ) , embedded_sdmmc:: Error < neotron_common_bios :: Error > > {
120+ ) -> Result < ( ) , embedded_sdmmc:: Error < bios :: Error > > {
121121 osprintln ! ( "Loading /{} from Block Device 0" , file_name) ;
122122 let bios_block = crate :: fs:: BiosBlock ( ) ;
123123 let time = crate :: fs:: BiosTime ( ) ;
@@ -142,7 +142,7 @@ fn play(_menu: &menu::Menu<Ctx>, _item: &menu::Item<Ctx>, args: &[&str], ctx: &m
142142 let bytes_read = mgr. read ( & mut volume, & mut file, & mut buffer) ?;
143143 let mut buffer = & buffer[ 0 ..bytes_read] ;
144144 while !buffer. is_empty ( ) {
145- let slice = neotron_common_bios :: FfiByteSlice :: new ( buffer) ;
145+ let slice = bios :: FfiByteSlice :: new ( buffer) ;
146146 let played = unsafe { ( api. audio_output_data ) ( slice) . unwrap ( ) } ;
147147 buffer = & buffer[ played..] ;
148148 delta += played;
0 commit comments