mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-08 04:56:43 +00:00
back-propagate pause->abort changes.
in many of the test routines what we really wanted was an abort, not a pause.
This commit is contained in:
parent
4440e61d02
commit
9116cb02b1
4 changed files with 6 additions and 6 deletions
|
|
@ -130,7 +130,7 @@ impl<'a> ShellCmdApi<'a> for Audio {
|
|||
env.codec.swap_frames(&mut frames).unwrap();
|
||||
} else if *routing_id == STOP_ID {
|
||||
let mut ret = String::<1024>::new();
|
||||
env.codec.pause().unwrap(); // this should stop callbacks from occurring too.
|
||||
env.codec.abort().unwrap(); // this should stop callbacks from occurring too.
|
||||
write!(ret, "{} {} {}.",
|
||||
t!("replapp.audio.completion_a", xous::LANG),
|
||||
self.framecount,
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ impl<'a> ShellCmdApi<'a> for Audio {
|
|||
// we'll get a callback that demands the next data...
|
||||
}
|
||||
"stop" => {
|
||||
self.codec.pause().unwrap(); // this should stop callbacks from occurring too.
|
||||
self.codec.abort().unwrap(); // this should stop callbacks from occurring too.
|
||||
write!(ret, "Playback stopped at {} frames.", self.framecount).unwrap();
|
||||
self.framecount = 0;
|
||||
self.play_ptr_bytes = 0;
|
||||
|
|
@ -205,7 +205,7 @@ impl<'a> ShellCmdApi<'a> for Audio {
|
|||
} else {
|
||||
log::debug!("stopping playback");
|
||||
if self.framecount != 0 {
|
||||
self.codec.pause().unwrap(); // this should stop callbacks from occurring too.
|
||||
self.codec.abort().unwrap(); // this should stop callbacks from occurring too.
|
||||
write!(ret, "Playback of {} frames finished", self.framecount).unwrap();
|
||||
self.framecount = 0;
|
||||
self.play_ptr_bytes = 0;
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@ impl<'a> ShellCmdApi<'a> for Test {
|
|||
|
||||
}
|
||||
"astop" => {
|
||||
self.codec.pause().unwrap(); // this should stop callbacks from occurring too.
|
||||
self.codec.abort().unwrap(); // this should stop callbacks from occurring too.
|
||||
write!(ret, "Playback stopped at {} frames.", self.framecount).unwrap();
|
||||
self.framecount = 0;
|
||||
self.play_sample = 0.0;
|
||||
|
|
@ -680,7 +680,7 @@ impl<'a> ShellCmdApi<'a> for Test {
|
|||
_ => self.freq = 659.25,
|
||||
}
|
||||
if elapsed - self.oqc_start > 6000 {
|
||||
self.codec.pause().unwrap();
|
||||
self.codec.abort().unwrap();
|
||||
|
||||
// put system automatically into ship mode at conclusion of test
|
||||
env.gam.shipmode_blank_request().unwrap();
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ impl Tts {
|
|||
impl<'a> ShellCmdApi<'a> for Tts {
|
||||
cmd_api!(tts); // inserts boilerplate for command API
|
||||
|
||||
fn process(&mut self, args: String::<1024>, env: &mut CommonEnv) -> Result<Option<String::<1024>>, xous::Error> {
|
||||
fn process(&mut self, args: String::<1024>, _env: &mut CommonEnv) -> Result<Option<String::<1024>>, xous::Error> {
|
||||
let mut ret = String::<1024>::new();
|
||||
let helpstring = "tts options: speak";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue