XRoar and sound

A place to discuss everything Dragon related that doesn't fall into the other categories.
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

XRoar and sound

Post by pser1 »

Hi Ciaran,
I have found that after issuing any sound command:
SOUND120,3 or PLAY"CDEFG"
If you minimize the XRoar, or open it again or simply moving it around, a low freq. noise is produced
This doesn't happen before sound/play commands so it is related to the sound emulation.
This happens emulating Dragon-Tano-CoCo and probably the others too.

Testing with older versions, I have found that all of them have the problem untill I got this one
XRoar v0.34.8 snapshot 2017-36436
This is the 'last' one that doesn't suffer this problem.
Maybe you could give them a peek and find out what is causing this behaviour ...
Thanks in advance
cheers
pere

EDIT: Sorry, forgot to say that this happens on a Windows 7
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XRoar and sound

Post by pser1 »

HI,
I have just downloaded snapshot 49442 and tested windows 64bits
The old configurations that produce sound with old snapshots (41907),
don't produce any sound with this new snapshot
Should we change any parameters?
A simple basic command as SOUND150,3 outputs no sound at all
Same with PLAY"CDEFG", no sound is output ...
thanks in advance
pere
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XRoar and sound

Post by pser1 »

for maybe it could help, I attach here the debug windows of both snapshots
The last one fails lading the SDL2 audio ...
regards
pere
OldSnapshot-small.jpg
OldSnapshot-small.jpg (56.52 KiB) Viewed 4551 times
NewSnapshot-small.jpg
NewSnapshot-small.jpg (55.71 KiB) Viewed 4551 times
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XRoar and sound

Post by sixxie »

Oh now that's interesting. Ron Klein also had issues with sound in recent source, but he was building directly on Windows using MSYS. I'll see what I can see...

The weird thing is I've not actually changed the sound code ;)

But I probably have updated SDL2 locally, so that seems like a good place to start looking!

(Ugh, sound works fine under Wine locally. This might be tricky to debug :/ )

Edit: ok first off, I've updated SDL2 to 2.0.7 - can you try the 2017-49577 snapshot build? Again, works ok locally, so no really good test I can do...
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XRoar and sound

Post by pser1 »

Hi Ciaran,
sorry for the delay ...
I have downloaded and tested it.
Same ehaviour that previous snapshot
cheers
pere
newSnapshot-small.jpg
newSnapshot-small.jpg (58.92 KiB) Viewed 4539 times
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XRoar and sound

Post by sixxie »

Thank you for all the testing here...

Ok, in 2017-49598 that warning is a bit more informative - it definitely still won't work, but let's see what audio format is actually failing here. It *should* be defaulting to the native signed 16-bit format.

Also, as a workaround, maybe try "-ao-format s16" or "-ao-format u8".
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XRoar and sound

Post by pser1 »

Hello,
not good luck
Atached is the debug window.
None of the two possible workarounds do generate sound
regards
pere
lastSnap-small.jpg
lastSnap-small.jpg (57.24 KiB) Viewed 4533 times
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XRoar and sound

Post by sixxie »

Ok... 0x8120 means floating point audio. XRoar is requesting 16-bit signed native-endian by default, and is being told to use floating point. Interesting! I wonder why that has started happening...

So the core already supported floating point, I've hacked in support to the SDL driver. See how 2017-49609 goes?
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XRoar and sound

Post by pser1 »

Hello,
now it outputs sound, but awfully
sound has spikes and when no sound commands is entered the output is making
randomly low frq noise
kind regards
pere
Attachments
snap49609-small.jpg
snap49609-small.jpg (59.64 KiB) Viewed 4522 times
Alastair
Posts: 669
Joined: Fri Jul 18, 2008 11:33 pm

Re: XRoar and sound

Post by Alastair »

Pere,
have you tested both the 32-bit and 64-bit versions of XRoar? I'm using 32-bit Windows so I cannot try 64-bit XRoar, however none of the 32-bit XRoar versions that I have tried has failed to produce sound so it may be a problem specific to 64-bit XRoar.
Post Reply