Skip to content

Commit

Permalink
Added support for sample rate 88200Hz to the WebUI and the test suite…
Browse files Browse the repository at this point in the history
…, see #173

Disabled daemon parallel builds in build.sh (option -j)  as this can cause hangs on some platforms
Disabled streamer in daemon configuration used by platform and latency tests
Changed daemon version to 2.0.1
  • Loading branch information
bondagit committed Aug 19, 2024
1 parent 3d240fd commit 3af7dd3
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ The script allows a user to test a specific configuration and it can be used to

Usage run_test.sh sample_format sample_rate channels duration
sample_format can be one of S16_LE, S24_3LE, S32_LE
sample_rate can be one of 44100, 48000, 96000, 192000, 384000
sample_rate can be one of 44100, 48000, 88200, 96000, 192000, 384000
channels can be one of 2, 4, 6, up to 64
duration is in the range 1 to 10 minutes

Expand Down Expand Up @@ -310,7 +310,7 @@ The script allows a user to test the latency on a specific configuration and it

Usage run_latency_test.sh sample_format sample_rate channels duration frames
sample_format can be one of S16_LE, S24_3LE, S32_LE
sample_rate can be one of 44100, 48000, 96000, 192000, 384000
sample_rate can be one of 44100, 48000, 88200, 96000, 192000, 384000
channels can be one of 2, 4, 6, up to 64
duration of the test in seconds
frames buffer size in frames
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ cmake \
-DFAKE_DRIVER=OFF \
-DWITH_SYSTEMD=ON \
.
make -j
make
cd ..

2 changes: 1 addition & 1 deletion daemon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ where:
> **sample\_rate**
> JSON number specifying the default sample rate.
> Valid values are 44100Hz, 48000Hz, 96000Hz, 192000Hz and 384000Hz.
> Valid values are 44100Hz, 48000Hz, 88200Hz, 96000Hz, 192000Hz and 384000Hz.
> **playout\_delay**
> JSON number specifying the default safety playout delay at 1FS in samples.
Expand Down
2 changes: 1 addition & 1 deletion daemon/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace po = boost::program_options;
namespace postyle = boost::program_options::command_line_style;
namespace logging = boost::log;

static const std::string version("bondagit-2.0.0");
static const std::string version("bondagit-2.0.1");
static std::atomic<bool> terminate = false;

void termination_handler(int signum) {
Expand Down
4 changes: 3 additions & 1 deletion run_latency_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function cleanup {
function usage {
echo 'Usage run_latency_test.sh sample_format sample_rate channels duration frames' >&2
echo ' sample_format can be one of S16_LE, S24_3LE, S32_LE' >&2
echo ' sample_rate can be one of 44100, 48000, 96000, 192000, 384000' >&2
echo ' sample_rate can be one of 44100, 48000, 88200, 96000, 192000, 384000' >&2
echo ' channels can be one of 2, 4, 6, up to 64' >&2
echo ' duration in seconds' >&2
echo ' frames buffer size in frames' >&2
Expand Down Expand Up @@ -83,6 +83,8 @@ if [ $SAMPLE_RATE == "44100" ]; then
PTIME="1.08843537415"
elif [ $SAMPLE_RATE == "48000" ]; then
PTIME="1"
elif [ $SAMPLE_RATE == "88200" ]; then
PTIME="0.54421768707"
elif [ $SAMPLE_RATE == "96000" ]; then
PTIME="0.5"
elif [ $SAMPLE_RATE == "192000" ]; then
Expand Down
4 changes: 3 additions & 1 deletion run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ echo 'Creating test file ...' >&2
if ! ./createtest $1 $2 $3 $4 ; then
echo 'Usage run_test.sh sample_format sample_rate channels duration' >&2
echo ' sample_format can be one of S16_LE, S24_3LE, S32_LE' >&2
echo ' sample_rate can be one of 44100, 48000, 96000, 192000, 384000' >&2
echo ' sample_rate can be one of 44100, 48000, 88200, 96000, 192000, 384000' >&2
echo ' channels can be one of 2, 4, 6, up to 64' >&2
echo ' duration is in the range 1 to 10 minutes' >&2
exit 1
Expand All @@ -72,6 +72,8 @@ if [ $SAMPLE_RATE == "44100" ]; then
PTIME="1.08843537415"
elif [ $SAMPLE_RATE == "48000" ]; then
PTIME="1"
elif [ $SAMPLE_RATE == "88200" ]; then
PTIME="0.54421768707"
elif [ $SAMPLE_RATE == "96000" ]; then
PTIME="0.5"
elif [ $SAMPLE_RATE == "192000" ]; then
Expand Down
2 changes: 1 addition & 1 deletion test/createtest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int main(int argc, char* argv[])
}

int rate(atoi(argv[2]));
if (rate != 44100 && rate != 48000 && rate != 96000 && rate != 192000 && rate != 384000) {
if (rate != 44100 && rate != 48000 && rate != 88200 && rate != 96000 && rate != 192000 && rate != 384000) {
cerr << "Unsupported rate " << rate << endl;
exit(1);
}
Expand Down
2 changes: 1 addition & 1 deletion test/daemon.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"streamer_files_num": 8,
"streamer_file_duration": 1,
"streamer_player_buffer_files_num": 1,
"streamer_enabled": true,
"streamer_enabled": false,
"auto_sinks_update": true
}
1 change: 1 addition & 0 deletions webui/src/Config.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ class Config extends Component {
<select value={this.state.sampleRate} onChange={e => this.setState({sampleRate: e.target.value})}>
<option value="44100">44.1 kHz</option>
<option value="48000">48 kHz</option>
<option value="88200">88.2 kHz</option>
<option value="96000">96 kHz</option>
<option value="192000">192 kHz</option>
<option value="384000">384 kHz</option>
Expand Down

0 comments on commit 3af7dd3

Please sign in to comment.