Wii PCM 16 bit samples ASNDLIB

Post Reply
msmalik681
Posts: 4
Joined: Sun Jul 29, 2018 10:56 am

Wii PCM 16 bit samples ASNDLIB

Post by msmalik681 » Wed Aug 22, 2018 1:47 pm

I am using asndlib and it will play 8 bit mono pcm samples just fine. 16 bit mono pcm samples are just static. Here is a link to the source code if anyone can please help.

https://github.com/DCurrent/openbor/blo ... sblaster.c

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Wii PCM 16 bit samples ASNDLIB

Post by WinterMute » Sat Sep 15, 2018 7:37 pm

If it's really 16bit mono then you probably want VOICE_MONO_16BIT_LE rather than VOICE_STEREO_16BIT. Suspect it sounds like static because you're trying to play little endian samples in big endian mode.
Help keep devkitPro toolchains free, Donate today

Personal Blog

msmalik681
Posts: 4
Joined: Sun Jul 29, 2018 10:56 am

Re: Wii PCM 16 bit samples ASNDLIB

Post by msmalik681 » Sat Jan 19, 2019 6:30 pm

That did not work I tried them all. The audio documentation states the output sample will always be converted to 16 bit stereo anyway.

Is there anyway to check the input sample and if it is 16 bit mono pcm convert it to 8 bit mono pcm ? I did not write this code I just hope I can edit it to fix this little bug.

Also the engine can play all formats of audio in mp3 and ogg format it also plays 8 bit mono pcm samples just fine the only issue is only with 16 mono samples.

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Wii PCM 16 bit samples ASNDLIB

Post by WinterMute » Sat Jan 19, 2019 7:19 pm

Is there any chance you could put together a small test case for us to look at? Just the code you're using to play a sample & a couple of the samples that are failing - might be easier to figure out what's going wrong.
Help keep devkitPro toolchains free, Donate today

Personal Blog

msmalik681
Posts: 4
Joined: Sun Jul 29, 2018 10:56 am

Re: Wii PCM 16 bit samples ASNDLIB

Post by msmalik681 » Sat Jan 19, 2019 9:03 pm

Do you mean compile and recording the application while its playing 8 and 16 bit samples ?

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Wii PCM 16 bit samples ASNDLIB

Post by WinterMute » Sun Jan 20, 2019 5:14 pm

msmalik681 wrote:Do you mean compile and recording the application while its playing 8 and 16 bit samples ?
No, I mean just providing a small project we can compile that illustrates the problem.
Help keep devkitPro toolchains free, Donate today

Personal Blog

msmalik681
Posts: 4
Joined: Sun Jul 29, 2018 10:56 am

Re: Wii PCM 16 bit samples ASNDLIB

Post by msmalik681 » Sun Jan 20, 2019 6:04 pm

Sounds like more then can do lol.

I have spoken to one of the developers who thinks the 16 bit sample needs to be bit swapped to big edian.

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Wii PCM 16 bit samples ASNDLIB

Post by WinterMute » Wed Jan 23, 2019 3:10 am

msmalik681 wrote:Sounds like more then can do lol.

I have spoken to one of the developers who thinks the 16 bit sample needs to be bit swapped to big edian.
Can you at least supply one or two of the problematic samples?

changing endianness is done by bytes swaps, not bit swaps. In any case asndlib should be able to handle it just fine.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests