summaryrefslogtreecommitdiff
path: root/tools/pcm2pdm.py
diff options
context:
space:
mode:
authorJon Nordby <jononor@gmail.com>2025-04-18 02:24:47 +0200
committerMartin StensgÄrd <mastensg@mastensg.net>2025-04-18 16:12:03 +0200
commit01285386c9e5f7524169b4550ad2fa8c78936128 (patch)
treeaf6fcc96343b172487a7c44737668cec34ce43c2 /tools/pcm2pdm.py
parentdf870d193c3ca6552ae85307abbb9f998228a776 (diff)
tools: Unhardcode parameters
Diffstat (limited to 'tools/pcm2pdm.py')
-rw-r--r--tools/pcm2pdm.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/pcm2pdm.py b/tools/pcm2pdm.py
index 3a1fac6..4279eb2 100644
--- a/tools/pcm2pdm.py
+++ b/tools/pcm2pdm.py
@@ -56,7 +56,9 @@ def parse():
parser = argparse.ArgumentParser(description='Process an input file and write to an output file.')
parser.add_argument('-i', '--input', type=str, required=True, help='Path to the input file')
parser.add_argument('-o', '--output', type=str, required=True, help='Path to the output file')
-
+ #parser.add_argument('--samplerate', type=int, default=16000)
+ parser.add_argument('--oversample', type=int, default=64)
+
args = parser.parse_args()
return args
@@ -65,7 +67,7 @@ def main():
out_path = args.output
- pdm_data = convert_file(args.input, oversample=64)
+ pdm_data = convert_file(args.input, oversample=args.oversample)
with open(out_path, 'wb') as f:
save_pdm_bin(pdm_data, f)