Sound issues with BasiliskII-1.0 SDL2 and OSX Catalina

About BasiliskII, a 68k Mac emulator for Windows, MacOSX, and Linux that can run System 7.x through MacOS 8.1.

Moderators: Cat_7, Ronald P. Regensburg

kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: Sound issues with BasiliskII-1.0 SDL2 and OSX Catalina

Post by kanjitalk755 »

RichCini wrote: Sat Feb 06, 2021 1:21 pm If you’d like I can PM you the same code in two source files rather than in-line or I can try to submit on GitHub. Up to you.
If you have any improvements, please make a pull request on GitHub.
RichCini wrote: Sat Feb 06, 2021 1:21 pm Also, I’d like to find a better spot for the chime to sound, like after main window creation. If you can tell me where that is, I can test it. The original spot is after all of what I think are the hardware setups but I think it’s clunky to sound before the main window is open.
The timing to start playing the sound is difficult.
The delay between calling SDL_CreateWindow() and actually displaying it may vary depending on the platform and OS version.
RichCini
Inquisitive Elf
Posts: 38
Joined: Fri Feb 28, 2020 3:10 am

Re: Sound issues with BasiliskII-1.0 SDL2 and OSX Catalina

Post by RichCini »

Thanks. Pull requests submitted (hopefully I did it right...first-time Github contributor).

Rich
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Sound issues with BasiliskII-1.0 SDL2 and OSX Catalina

Post by adespoton »

kanjitalk755 wrote: Sun Feb 07, 2021 1:26 am
RichCini wrote: Sat Feb 06, 2021 1:21 pm If you’d like I can PM you the same code in two source files rather than in-line or I can try to submit on GitHub. Up to you.
If you have any improvements, please make a pull request on GitHub.
RichCini wrote: Sat Feb 06, 2021 1:21 pm Also, I’d like to find a better spot for the chime to sound, like after main window creation. If you can tell me where that is, I can test it. The original spot is after all of what I think are the hardware setups but I think it’s clunky to sound before the main window is open.
The timing to start playing the sound is difficult.
The delay between calling SDL_CreateWindow() and actually displaying it may vary depending on the platform and OS version.
Seems to me it should be after displaying the window in all cases, but before the System Folder load. This wouldn't be precisely accurate with the original, but would be simpler than patching the ROM to just play the sound without the hardware check.
RichCini
Inquisitive Elf
Posts: 38
Joined: Fri Feb 28, 2020 3:10 am

Re: Sound issues with BasiliskII-1.0 SDL2 and OSX Catalina

Post by RichCini »

@kanjitalk755 placed the code in audio_sdl.cpp and calls it at the end of audio initialization so that it will work with both BII and SS. I have only tried the BII version with the latest pull and it works fine.

Rich
RichCini
Inquisitive Elf
Posts: 38
Joined: Fri Feb 28, 2020 3:10 am

Re: Sound issues with BasiliskII-1.0 SDL2 and OSX Catalina

Post by RichCini »

Following up on this, I just downloaded the most recent pre-built OSX version of Basilisk II from September 13, 2022 and the startup chime no longer works. The kanjitalk755 fork does contain the proper code, but the cebix does not. Code from the August 1, 2021 download works fine. Just thought I'd mention it in case someone is wondering. I have not yet tried to build the kanji version from the source; that's up next.

{later}
Significant issues getting a clean build. Undoubtedly issues with getting the right search paths because I mostly get errors for "undefined symbols" for the mpfr and gmpz libraries. I have them installed through Homebrew, so I've added the respective paths (determined by "brew info gmp" for example) to both the header and library search paths (/include and /lib, respectively) under Projects and the Targets setting pages.

Rich
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Sound issues with BasiliskII-1.0 SDL2 and OSX Catalina

Post by Ronald P. Regensburg »

About the startup sound:
It does indeed not work in the September 13, 2022 build. I did not notice this before because I never use the feature. It does work in the September 13, 2022 SheepShaver build. I will notify kanjitalk755.

About gmp 6.2.1 and mpfr 4.1.0:
It works fine if these are installed as indicated at github.com/kanjitalk755/macemu.

A couple of years I also ran into this issue. I remember that I could not instal gmp 6.2.1 and/or mpfr 4.1.0 properly because of files with the same name that were already installed with/through homebrew, files that could not be replaced by the installation. I needed to remove those files manually first.

There must be a discussion about it somewhere, possibly among solved issues at kanjitalk755/macemu, but I cannot find it again.
RichCini
Inquisitive Elf
Posts: 38
Joined: Fri Feb 28, 2020 3:10 am

Re: Sound issues with BasiliskII-1.0 SDL2 and OSX Catalina

Post by RichCini »

Great, Ronald, thanks. I'll see if I can find the gmp/mpfr instructions and try that as well.

Rich
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Sound issues with BasiliskII-1.0 SDL2 and OSX Catalina

Post by Ronald P. Regensburg »

kanjitalk755 fixed the startup sound issue. I will post a new build as soon as I have time.
RichCini
Inquisitive Elf
Posts: 38
Joined: Fri Feb 28, 2020 3:10 am

Re: Sound issues with BasiliskII-1.0 SDL2 and OSX Catalina

Post by RichCini »

Thanks Ronald...works great.

I would also note that this build is super fast. Not sure if any optimizations had been done since last year (I didn't think so) but it runs really well on my Intel-based iMac.

Thanks again!
Rich
Post Reply