mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
fix regression due to #366
Boxing the `Codec` object and sticking it on the heap causes audio playback to hard-lock (no kp, no other explanation given). Not sure what the issue is, but a cleaner fix is arguably to simply increase the stack size so the objects can be allocated there. I suspect the problem may have to do with how the FIFO structures are memory-mapped and somehow this does not play nice with Box (there are `unsafe` routines within it).
This commit is contained in:
parent
9b7dbcee2a
commit
0b9199bc25
1 changed files with 12 additions and 2 deletions
|
|
@ -20,7 +20,17 @@ struct ScalarCallback {
|
|||
cb_to_client_id: u32,
|
||||
}
|
||||
|
||||
fn main() -> ! {
|
||||
fn main () -> ! {
|
||||
let stack_size = 256 * 1024;
|
||||
std::thread::Builder::new()
|
||||
.stack_size(stack_size)
|
||||
.spawn(wrapped_main)
|
||||
.unwrap()
|
||||
.join()
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
fn wrapped_main() -> ! {
|
||||
log_server::init_wait().unwrap();
|
||||
log::set_max_level(log::LevelFilter::Info);
|
||||
info!("my PID is {}", xous::process::id());
|
||||
|
|
@ -31,7 +41,7 @@ fn main() -> ! {
|
|||
log::trace!("registered with NS -- {:?}", codec_sid);
|
||||
|
||||
let codec_conn = xous::connect(codec_sid).expect("couldn't make connection for the codec implementation");
|
||||
let mut codec = Box::new(Codec::new(codec_conn, &xns));
|
||||
let mut codec = Codec::new(codec_conn, &xns);
|
||||
|
||||
let ticktimer = ticktimer_server::Ticktimer::new().unwrap();
|
||||
log::trace!("ready to accept requests");
|
||||
|
|
|
|||
Loading…
Reference in a new issue