Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Partial fix of the gen_tone tool
This fixes the gen_tone main() enough to build gen_tone.o, though I
still get linker issues attempting to build the final binary.
  • Loading branch information
doismellburning committed Jul 17, 2025
commit 6e26fb5e5fb5d910383b2cdc66b705ac4fddc2b0
18 changes: 9 additions & 9 deletions src/gen_tone.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,15 +709,15 @@ int main ()
strlcpy (my_audio_config.adev[0].adevice_out, DEFAULT_ADEVICE, sizeof(my_audio_config.adev[0].adevice_out));

audio_open (&my_audio_config);
gen_tone_init (&my_audio_config, 100);
gen_tone_init (&my_audio_config, 100, 0);

for (r=0; r<2; r++) {

for (n=0; n<my_audio_config.baud[0] * 2 ; n++) {
for (n=0; n<my_audio_config.achan[0].baud * 2 ; n++) {
tone_gen_put_bit ( chan1, 1 );
}

for (n=0; n<my_audio_config.baud[0] * 2 ; n++) {
for (n=0; n<my_audio_config.achan[0].baud * 2 ; n++) {
tone_gen_put_bit ( chan1, 0 );
}
}
Expand All @@ -728,27 +728,27 @@ int main ()

memset (&my_audio_config, 0, sizeof(my_audio_config));
strlcpy (my_audio_config.adev[0].adevice_in, DEFAULT_ADEVICE, sizeof(my_audio_config.adev[0].adevice_in));
strlcpy (my_audio_config.adev[0].adevice_out, DEFAULT_ADEVICE, , sizeof(my_audio_config.adev[0].adevice_out));
strlcpy (my_audio_config.adev[0].adevice_out, DEFAULT_ADEVICE, sizeof(my_audio_config.adev[0].adevice_out));
my_audio_config.adev[0].num_channels = 2;

audio_open (&my_audio_config);
gen_tone_init (&my_audio_config, 100);
gen_tone_init (&my_audio_config, 100, 0);

for (r=0; r<4; r++) {

for (n=0; n<my_audio_config.baud[0] * 2 ; n++) {
for (n=0; n<my_audio_config.achan[0].baud * 2 ; n++) {
tone_gen_put_bit ( chan1, 1 );
}

for (n=0; n<my_audio_config.baud[0] * 2 ; n++) {
for (n=0; n<my_audio_config.achan[0].baud * 2 ; n++) {
tone_gen_put_bit ( chan1, 0 );
}

for (n=0; n<my_audio_config.baud[0] * 2 ; n++) {
for (n=0; n<my_audio_config.achan[0].baud * 2 ; n++) {
tone_gen_put_bit ( chan2, 1 );
}

for (n=0; n<my_audio_config.baud[0] * 2 ; n++) {
for (n=0; n<my_audio_config.achan[0].baud * 2 ; n++) {
tone_gen_put_bit ( chan2, 0 );
}
}
Expand Down