mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +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();
|
env.codec.swap_frames(&mut frames).unwrap();
|
||||||
} else if *routing_id == STOP_ID {
|
} else if *routing_id == STOP_ID {
|
||||||
let mut ret = String::<1024>::new();
|
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, "{} {} {}.",
|
write!(ret, "{} {} {}.",
|
||||||
t!("replapp.audio.completion_a", xous::LANG),
|
t!("replapp.audio.completion_a", xous::LANG),
|
||||||
self.framecount,
|
self.framecount,
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ impl<'a> ShellCmdApi<'a> for Audio {
|
||||||
// we'll get a callback that demands the next data...
|
// we'll get a callback that demands the next data...
|
||||||
}
|
}
|
||||||
"stop" => {
|
"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();
|
write!(ret, "Playback stopped at {} frames.", self.framecount).unwrap();
|
||||||
self.framecount = 0;
|
self.framecount = 0;
|
||||||
self.play_ptr_bytes = 0;
|
self.play_ptr_bytes = 0;
|
||||||
|
|
@ -205,7 +205,7 @@ impl<'a> ShellCmdApi<'a> for Audio {
|
||||||
} else {
|
} else {
|
||||||
log::debug!("stopping playback");
|
log::debug!("stopping playback");
|
||||||
if self.framecount != 0 {
|
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();
|
write!(ret, "Playback of {} frames finished", self.framecount).unwrap();
|
||||||
self.framecount = 0;
|
self.framecount = 0;
|
||||||
self.play_ptr_bytes = 0;
|
self.play_ptr_bytes = 0;
|
||||||
|
|
|
||||||
|
|
@ -360,7 +360,7 @@ impl<'a> ShellCmdApi<'a> for Test {
|
||||||
|
|
||||||
}
|
}
|
||||||
"astop" => {
|
"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();
|
write!(ret, "Playback stopped at {} frames.", self.framecount).unwrap();
|
||||||
self.framecount = 0;
|
self.framecount = 0;
|
||||||
self.play_sample = 0.0;
|
self.play_sample = 0.0;
|
||||||
|
|
@ -680,7 +680,7 @@ impl<'a> ShellCmdApi<'a> for Test {
|
||||||
_ => self.freq = 659.25,
|
_ => self.freq = 659.25,
|
||||||
}
|
}
|
||||||
if elapsed - self.oqc_start > 6000 {
|
if elapsed - self.oqc_start > 6000 {
|
||||||
self.codec.pause().unwrap();
|
self.codec.abort().unwrap();
|
||||||
|
|
||||||
// put system automatically into ship mode at conclusion of test
|
// put system automatically into ship mode at conclusion of test
|
||||||
env.gam.shipmode_blank_request().unwrap();
|
env.gam.shipmode_blank_request().unwrap();
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ impl Tts {
|
||||||
impl<'a> ShellCmdApi<'a> for Tts {
|
impl<'a> ShellCmdApi<'a> for Tts {
|
||||||
cmd_api!(tts); // inserts boilerplate for command API
|
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 mut ret = String::<1024>::new();
|
||||||
let helpstring = "tts options: speak";
|
let helpstring = "tts options: speak";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue