Sound Issues

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Carl
Space Cadet
Posts: 7
Joined: Wed Sep 16, 2009 1:32 pm

Sound Issues

Post by Carl »

Hi,

I have just installed SheepShaver, and I'm having problems with the sound. It works, but it sounds very bad and choppy. Not sure how to describe it, imagine a broken radio or something.
I've had this issue before with another computer I used SheepShaver with (an earlier version though). I am now using the latest version (at least I think it's the latest. It's from 21 July 2008, the one from this forum). I am running mac OS 9.0.
I thought since I've had this problem twice on different computers it might be common. Any ideas?
Evertype
Student Driver
Posts: 16
Joined: Tue Sep 08, 2009 7:54 am
Location: Dundee

Post by Evertype »

I had a similar problem the other week when I was running OS 8.5.1. I seem to have fixed that, and no, I am not sure how. The instructions say make sure "Built In" is selected in Sound Preferences.

Today, however, I upgraded to OS 9.0, and 9.0.4… and now I have no sound at all and SheepShaver hangs when I try to open the Sound control panel. :(

I wonder if it's possible to edit the Sound preferences file. I'm running versiion 8.1.3 of the Sound control panel.
Evertype
Student Driver
Posts: 16
Joined: Tue Sep 08, 2009 7:54 am
Location: Dundee

Post by Evertype »

I found a fix to get my sound running: I copied the Sound Preferences from my Cube (running 9.2.2) and put that in SheepShaver > System Folder > Preferences.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6318
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

@Carl
Maybe the 2009-08-23 version is a little better. It is posted here: http://www.emaculation.com/forum/viewto ... 0713#30713

Make sure JIT Compiler is enabled in preference settings.

The faster your host machine, the smoother the sound.
Carl
Space Cadet
Posts: 7
Joined: Wed Sep 16, 2009 1:32 pm

Post by Carl »

Thanks for trying, but that new version actually made things worse. Sometimes it doesn't play sound at all for several seconds, then for a very short time, then silence again.

I don't have an old mac to copy prefs from, either. I have an OS 9 system folder for using classic, but I couldn't find any sound prefs in it.
I think I'll try Mac OS 8, if I can find it anywhere.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6318
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

Carl wrote:I don't have an old mac to copy prefs from, either. I have an OS 9 system folder for using classic, but I couldn't find any sound prefs in it.
I think I'll try Mac OS 8, if I can find it anywhere.
I do not think a different MacOS Sound Preferences file will help. The Sound control panel in MacOS 9.0/9.0.4 (version 8.1.3) creates the appropriate preferences and should work fine.

What kind of sound do you have problems with? Demanding sounds will not play smoothly in SheepShaver whatever you do. The faster the host machine, the less problems Did you make sure JIT Compiler was enabled in SheepShaver preferences?
User avatar
Ronald P. Regensburg
Expert User
Posts: 6318
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

Additional advice: Remove 'Apple Audio Extension' and 'Sound Manager' if present in the Extensions folder, and do not install a QuickTime version newer than version 4.1.2.
Carl
Space Cadet
Posts: 7
Joined: Wed Sep 16, 2009 1:32 pm

Post by Carl »

The extensions have been removed, but the problem persists. :(

JIT Compiler is on, QuickTime is version 4.1. Also, the newer version (of SheepShaver) has stopped working for some reason, it just quits when I start it. I deleted the preferences and even tried downloading it again, but it still doesn't work. No biggie I guess since the problems were worse for me with that version, but I thought that you should know. The Sound control panel is also version 8.1.3 so it's not that either.

The sound shouldn't be too demanding, even if I'm just listening to the alert sounds in Sound it's choppy. Also, the computer I'm using is a powerbook G4. Not a very beefy machine but I have the exact same problems with my G5 iMac (which is also pretty old but should be able to play alert sounds in system 9! :?).
User avatar
Ronald P. Regensburg
Expert User
Posts: 6318
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

Carl wrote:The sound shouldn't be too demanding, even if I'm just listening to the alert sounds in Sound it's choppy. Also, the computer I'm using is a powerbook G4. Not a very beefy machine but I have the exact same problems with my G5 iMac (which is also pretty old but should be able to play alert sounds in system 9! :?).
Sound performs more or less acceptable on my 2.4GHz Intel Core 2 Duo iMac. On slower machines, and especially on PPC machines, sound is problematic. JIT Compiler is not functional on PPC because there is no CPU emulation on PPC. Also, SheepShaver uses almost 100% CPU on PPC (you can check that in Activity Monitor). You can lower the CPU usage by lowering the Refresh Rate in SheepShaver settings to 30 or 15Hz. Maybe that will provide more room for the audio.

The May 2006 snapshot by Gwenole Beauchesne is slow on Intel but it will perform better on PPC with regard to CPU usage and sound. Be aware of bugs in that version. Most important: Do not use the shared folder (Unix Root) feature in that version, it will cause file corruption and file loss. Annoying can be the fact that in that version the displayed cursor position is always a few pixels 'off' the cursor hotspot.
http://gwenole.beauchesne.info/en/projects/sheepshaver
Carl
Space Cadet
Posts: 7
Joined: Wed Sep 16, 2009 1:32 pm

Post by Carl »

I tried the older version with only 5Hz refresh rate. Still the same thing, though. So I guess my computer is too old, huh? :(

Thanks anyway, I appreciate it.
Galane
Tinkerer
Posts: 58
Joined: Mon Sep 07, 2009 3:03 am

Post by Galane »

Carl wrote:Also, the newer version (of SheepShaver) has stopped working for some reason, it just quits when I start it. I deleted the preferences and even tried downloading it again, but it still doesn't work.
Did you change the ROM you were using? 8.5 through 9.0.4 work with the old or new world ROM, but you have to stick with the ROM used to install the OS.

8.1 and older need the old world ROM.
gartmann
Space Cadet
Posts: 5
Joined: Thu Sep 17, 2009 10:48 am
Location: Freiburg, Germany

Similar Problem

Post by gartmann »

On my dual processor quad-core 2.8 GHz Mac I try to run an old game.
The game as such is working fine. But the music is somehow garbled. Normal sounds are all right. Only the music of the game sounds as if several voices are no longer played synchronously. Next, I tried an AIF file. This sounds a lot better but suffers from short interruptions. Thus, is there anything I can do to have the music of the game sound better?

Regards,
Christoph Gartmann
User avatar
Ronald P. Regensburg
Expert User
Posts: 6318
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

On a fast Intel Mac, not too demanding sound is acceptable but nothing more than that. I do not know if SheepShaver can make full use of the capabilities of your dual quad-core processor.

I do not know any other suggestions for improving sound than those mentioned above.
gartmann
Space Cadet
Posts: 5
Joined: Thu Sep 17, 2009 10:48 am
Location: Freiburg, Germany

Post by gartmann »

The sound of the game is not demanding. It looks as if the sound is somewhat different than "normal sound" and therefore is getting out of sync. The first five seconds are ok, then things get garbled :-(
CharlesS
Tinkerer
Posts: 97
Joined: Thu Aug 14, 2008 9:05 am

Post by CharlesS »

I have found that if you download the source and edit SDL/audio_sdl.cpp to reduce the number of samples to something low like 2048 (the default is 16384), the sound will be a lot smoother, but the overall speed of the emulation will be reduced.

It seems to be due to a bug in the audio layer somewhere - when I was playing with this earlier this summer, the GetSourceData() in AudioInterrupt() was only filling a certain part of the buffer - while it was supposed to hold 65536 bytes, only a smaller amount would get filled - and it was the same amount each time. I don't remember what the number was, but it was something around 20000 (might have been 20448). The weird thing was, those 20448 bytes weren't at the beginning of the buffer - they'd usually be in the middle somewhere, with zeros both to the left and to the right. The number of bytes written would always be this constant whenever the number of samples was high - reducing the number of samples past a certain point would make the actual bytes written less constant and more random-looking, and reducing it far enough made the buffer actually get filled, causing the sound to be normal. But then, things would be slower in general.

Unfortunately, I never did figure out what was causing this, and now I don't really have time to mess with this anymore for a while...
gartmann
Space Cadet
Posts: 5
Joined: Thu Sep 17, 2009 10:48 am
Location: Freiburg, Germany

Post by gartmann »

This is what I thought: to me the sound problem looks more like a bug than an overall problem. So your findings sound quite reasonable.

Regards,
Christoph Gartmann
User avatar
Ronald P. Regensburg
Expert User
Posts: 6318
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

A "SDL audio patch" was applied on 19 February 2009 for BasiliskII and SheepShaver, intended to improve sound on slow host machines. However, it appeared that (at least on faster machines) the patch caused very poor sound in BasiliskII. The patch was applied to the file audio_sdl.cpp that 'CharlesS' mentions above.

Building BasiliskII with the pre-19 Februari version of the file, greatly improved sound performance in BasiliskII compared with other recent builds.

The same may be true for SheepShaver. Here is a new SheepShaver UB version, build from the current source, but without the 19 February audio patch.

Please test this version. I am interested to hear whether this version has better audio performance than the other builds since February this year.

http://www.xs4all.nl/~ronaldpr/sheepsha ... 091004.zip
gartmann
Space Cadet
Posts: 5
Joined: Thu Sep 17, 2009 10:48 am
Location: Freiburg, Germany

Post by gartmann »

I just tried this version on a 2.4 GHz Intel Core 2 Duo PowerBook. The sound is different, a bit better but still buggy. The game in question is
http://macintoshgarden.org/games/prince-of-persia
The sound as such is all right but not the Music.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6318
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

Isn't that game a 68k application? If so, it will probably work better in BasililskII.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6318
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

I wonder what you find "buggy" about the sound. I tried the game in 9.0.4 in my latest SheepShaver build on my 2.4 GHz Intel Core 2 Duo iMac with Leopard 10.5.8 as well as in 7.5.5 in my latest BasiliskII build on the same iMac, and I do not notice any anomalies in music or game sounds and no differences in sound between the two configurations.
PeterHolbrook
Apple Corer
Posts: 247
Joined: Fri Oct 26, 2007 7:56 am

Post by PeterHolbrook »

Ronald P. Regensburg wrote:Please test this version. I am interested to hear whether this version has better audio performance than the other builds since February this year.
Dear Ronald,

It's definitely superior to previous builds. Just one example: If you run Monkey Island 2 (LeChuck's Revenge) on previous builds, the sound is clearly choppy. You have to just imagine many notes, perhaps as much as 30 or 40%. Now the sound is still a little bit jerky, but it appears all the notes are there. I hope your improvements become a part of the "official" code. Congratulations.
User avatar
Cat_7
Expert User
Posts: 5016
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Hi peter,

It is rather the other way around. Someone contributed a patch to improve audio performance that now seems to have the opposite effect. We are only reversing the effect so the old state is restored.

Cat_7
PeterHolbrook
Apple Corer
Posts: 247
Joined: Fri Oct 26, 2007 7:56 am

Post by PeterHolbrook »

Cat_7 wrote:Hi peter,

It is rather the other way around. Someone contributed a patch to improve audio performance that now seems to have the opposite effect. We are only reversing the effect so the old state is restored.

Cat_7
I don't quite follow what you are saying. I've been using SheepShaver sporadically for several years now and have downloaded all the builds posted here, and never once did the Monkey Island theme sound reasonably complete until now. How old are the old builds you are talking about? Be that as it may, the sound is definitely better than it used to be in my experience.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6318
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

There may be other changes in SheepShaver that account for overall beter performance. There have been many changes in the source this year, among which changes that make SheepShaver use much less CPU time.

The essential change in this latest build with respect to audio was indeed reverting to an older version of a file in the source that was patched last February. The patch was applied to improve sound performance, but it made it worse.
User avatar
bamdad
Tinkerer
Posts: 40
Joined: Fri Feb 08, 2008 10:33 am
Location: budapest, hungary

Post by bamdad »

Ronald P. Regensburg wrote:(...)

Please test this version. I am interested to hear whether this version has better audio performance than the other builds since February this year.

http://www.xs4all.nl/~ronaldpr/sheepsha ... 091004.zip
i've found this one to have significantly better sound output - like your basiliskii build with the same date. maybe this should be a sicky too. ;)
Post Reply