Project-DS icon indicating copy to clipboard operation
Project-DS copied to clipboard

Songs play too slowly

Open Epicpkmn11 opened this issue 3 years ago • 2 comments

The OGGs I dumped from F 2nd (Vita) and MEGA39's (Switch) are both 48,000 Hz, but Project DS seems to be expecting 44,100 Hz, so they play too slowly.

Converting them down to 44,100 Hz they seem to be playing correctly to me, so I just used this to convert with ffmpeg instead:

#!/bin/bash

cd "$(dirname "$0")"

mkdir -p pcm

for OGG in ogg/*; do
	echo $(basename $OGG)
	ffmpeg -i $OGG -f s16le -ar 44100 -ac 1 pcm/$(basename $OGG .ogg).pcm -loglevel error
done

Epicpkmn11 avatar Aug 05 '22 17:08 Epicpkmn11

Ah, I didn't realize that some games have different frequencies; I should probably do something to support that. It's worth noting though that the PCM format Project DS uses is half frequency with 2 channels, and it looks like you're converting to full frequency with 1 channel. It'll play fine, it just won't have proper stereo sound.

Hydr8gon avatar Aug 05 '22 17:08 Hydr8gon

Ah, I didn't actually look to see what it was, just tried a common one and it sounded right.

I think this should be correct then for anyone else having this issue until it's properly fixed:

#!/bin/bash

cd "$(dirname "$0")"

mkdir -p pcm

for OGG in ogg/*; do
	echo $(basename $OGG)
	ffmpeg -i $OGG -f s16le -ar 22050 -ac 2 pcm/$(basename $OGG .ogg).pcm -loglevel error
done

Epicpkmn11 avatar Aug 05 '22 18:08 Epicpkmn11