Skip to content

Commit

Permalink
Fix ignoring project vocal loudness set to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
john-kurkowski committed Sep 28, 2024
1 parent 1bcd135 commit 41cac68
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 50 deletions.
2 changes: 1 addition & 1 deletion src/music/render/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ async def process(

if vocal_loudness_worth is None:
vocal_loudness_worth = float(
project.metadata.get("vocal-loudness-worth") or VOCAL_LOUDNESS_WORTH
project.metadata.get("vocal-loudness-worth", VOCAL_LOUDNESS_WORTH)
)

results = []
Expand Down
56 changes: 7 additions & 49 deletions tests/render/__snapshots__/test_render.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,7 @@
'metadata.get',
tuple(
'vocal-loudness-worth',
),
dict({
}),
),
_Call(
'metadata.get().__bool__',
tuple(
2.0,
),
dict({
}),
Expand Down Expand Up @@ -441,13 +435,7 @@
'metadata.get',
tuple(
'vocal-loudness-worth',
),
dict({
}),
),
_Call(
'metadata.get().__bool__',
tuple(
2.0,
),
dict({
}),
Expand Down Expand Up @@ -780,13 +768,7 @@
'metadata.get',
tuple(
'vocal-loudness-worth',
),
dict({
}),
),
_Call(
'metadata.get().__bool__',
tuple(
2.0,
),
dict({
}),
Expand Down Expand Up @@ -1000,13 +982,7 @@
'metadata.get',
tuple(
'vocal-loudness-worth',
),
dict({
}),
),
_Call(
'metadata.get().__bool__',
tuple(
2.0,
),
dict({
}),
Expand Down Expand Up @@ -1544,13 +1520,7 @@
'metadata.get',
tuple(
'vocal-loudness-worth',
),
dict({
}),
),
_Call(
'metadata.get().__bool__',
tuple(
2.0,
),
dict({
}),
Expand Down Expand Up @@ -1684,13 +1654,7 @@
'metadata.get',
tuple(
'vocal-loudness-worth',
),
dict({
}),
),
_Call(
'metadata.get().__bool__',
tuple(
2.0,
),
dict({
}),
Expand Down Expand Up @@ -1827,13 +1791,7 @@
'metadata.get',
tuple(
'vocal-loudness-worth',
),
dict({
}),
),
_Call(
'metadata.get().__bool__',
tuple(
2.0,
),
dict({
}),
Expand Down

0 comments on commit 41cac68

Please sign in to comment.