Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace wavparse with decodebin to enable arbitrary audio files #28

Merged
merged 3 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Replace stimulus_ref.wav with stimulus_ref.flac
To test parsing of other files than WAV works. Only add a test with ref
and test stimulus reversed to ensure both formats work for both input.
  • Loading branch information
martinholters committed Jun 26, 2024
commit 2c53b43722c6321d4b3c600208d7b0734292207f
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
test/stimulus_ref.wav filter=lfs diff=lfs merge=lfs -text
test/stimulus_ref.flac filter=lfs diff=lfs merge=lfs -text
test/stimulus_test.wav filter=lfs diff=lfs merge=lfs -text
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ SUBDIRS = src doc
EXTRA_DIST=INSTALL.Windows vs/gstpeaq.props \
vs/gstpeaq.vcxproj vs/peaq.vcxproj vs/gstpeaq.sln \
INSTALL.OSX xcode/GstPEAQ.xcodeproj/project.pbxproj \
test/stimulus_ref.wav test/stimulus_test.wav
test/stimulus_ref.flac test/stimulus_test.wav
10 changes: 9 additions & 1 deletion src/runtest-1.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,18 @@ if [ x$ODG != x-2.007 ]; then
fi

ODG=`LC_ALL=C ./peaq --gst-disable-segtrap --gst-debug-level=2 --gst-plugin-load=.libs/libgstpeaq.so \
${srcdir}/../test/stimulus_ref.wav ${srcdir}/../test/stimulus_test.wav \
${srcdir}/../test/stimulus_ref.flac ${srcdir}/../test/stimulus_test.wav \
| grep "Objective Difference Grade:" | cut -d " " -f4`
echo $ODG
if [ x$ODG != x-1.077 ]; then
exit 1
fi
ODG=`LC_ALL=C ./peaq --gst-disable-segtrap --gst-debug-level=2 --gst-plugin-load=.libs/libgstpeaq.so \
${srcdir}/../test/stimulus_test.wav ${srcdir}/../test/stimulus_ref.flac \
| grep "Objective Difference Grade:" | cut -d " " -f4`
echo $ODG
if [ x$ODG != x-3.096 ]; then
exit 1
fi

exit 0
3 changes: 3 additions & 0 deletions test/stimulus_ref.flac
Git LFS file not shown
3 changes: 0 additions & 3 deletions test/stimulus_ref.wav

This file was deleted.

9 changes: 8 additions & 1 deletion vs/runtest-win32.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,15 @@ if ($ODG -ne -2.007) {

$ODG = [convert]::ToDouble(( `
Invoke-Expression ("$PSScriptRoot\win32\Release\peaq.exe --gst-plugin-load=$PSScriptRoot\win32\Release\gstpeaq.dll " + `
"$PSScriptRoot\..\test\stimulus_ref.wav $PSScriptRoot\..\test\stimulus_test.wav") `
"$PSScriptRoot\..\test\stimulus_ref.flac $PSScriptRoot\..\test\stimulus_test.wav") `
| Select-String -Pattern 'Objective Difference Grade: (.*)').Matches.Groups[1].Value)
if ($ODG -ne -1.077) {
throw "$ODG -ne -1.077"
}
$ODG = [convert]::ToDouble(( `
Invoke-Expression ("$PSScriptRoot\win32\Release\peaq.exe --gst-plugin-load=$PSScriptRoot\win32\Release\gstpeaq.dll " + `
"$PSScriptRoot\..\test\stimulus_test.wav $PSScriptRoot\..\test\stimulus_ref.flac ") `
| Select-String -Pattern 'Objective Difference Grade: (.*)').Matches.Groups[1].Value)
if ($ODG -ne -3.096) {
throw "$ODG -ne -3.096"
}
9 changes: 8 additions & 1 deletion vs/runtest-x64.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,15 @@ if ($ODG -ne -2.007) {

$ODG = [convert]::ToDouble(( `
Invoke-Expression ("$PSScriptRoot\x64\Release\peaq.exe --gst-plugin-load=$PSScriptRoot\x64\Release\gstpeaq.dll " + `
"$PSScriptRoot\..\test\stimulus_ref.wav $PSScriptRoot\..\test\stimulus_test.wav") `
"$PSScriptRoot\..\test\stimulus_ref.flac $PSScriptRoot\..\test\stimulus_test.wav") `
| Select-String -Pattern 'Objective Difference Grade: (.*)').Matches.Groups[1].Value)
if ($ODG -ne -1.077) {
throw "$ODG -ne -1.077"
}
$ODG = [convert]::ToDouble(( `
Invoke-Expression ("$PSScriptRoot\x64\Release\peaq.exe --gst-plugin-load=$PSScriptRoot\x64\Release\gstpeaq.dll " + `
"$PSScriptRoot\..\test\stimulus_test.wav $PSScriptRoot\..\test\stimulus_ref.flac ") `
| Select-String -Pattern 'Objective Difference Grade: (.*)').Matches.Groups[1].Value)
if ($ODG -ne -3.096) {
throw "$ODG -ne -3.096"
}