Skip to content

Commit

Permalink
A couple of tweaks to try and get some audio going
Browse files Browse the repository at this point in the history
I think shared (volatile) variables just aren't cutting it...
  • Loading branch information
shermp committed Jun 19, 2024
1 parent 6b6a477 commit c020784
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ add_executable(pico-asha
target_include_directories(pico-asha PUBLIC src/ lib/)
# target_compile_definitions(asha PUBLIC CFG_TUSB_DEBUG=1)
# target_compile_definitions(asha PUBLIC ASHA_PERF_TEST)
target_compile_definitions(pico-asha PUBLIC ASHA_LOG_INFO)
target_compile_definitions(pico-asha PUBLIC ASHA_LOG_AUDIO)
# target_compile_definitions(pico-asha PUBLIC ASHA_DELETE_PAIRINGS)

pico_add_extra_outputs(pico-asha)
Expand Down
4 changes: 3 additions & 1 deletion src/asha_bt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,9 @@ static void audio_starter()
write_acp(*r, ACPOpCode::start);
}
}
}
} else {
LOG_AUDIO("pcm_streaming: false\n");
}
}

/* Change connection parameters for device */
Expand Down
2 changes: 1 addition & 1 deletion src/usb_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,14 @@ void audio_task(void)
}

if (spk_data_size) {
asha_shared.pcm_streaming = true;
if (spk_data_size != ASHA_PCM_STEREO_PACKET_SIZE * 2) {
return;
}
if (asha_shared.encode_audio) {

asha_audio_g_enc_1ms(&asha_shared, spk_buf);
}
asha_shared.pcm_streaming = true;
spk_data_size = 0;
} //else {
//pcm_buff.streaming = false;
Expand Down

0 comments on commit c020784

Please sign in to comment.