tildearrow / furnace

a multi-system chiptune tracker compatible with DefleMask modules
GNU General Public License v2.0
2.64k stars 208 forks source link

Audio issues when using BlackHole on macOS #603

Closed H4shtagInclude closed 1 year ago

H4shtagInclude commented 2 years ago

When ever I try to play a note it, it stops half way through the playback and then why I try to play the note again it doesn't work requiring me to completely restart Furnace. I've tried several options like changing the audio back end to JACK then back to SDL or changing the sample rate; lowering the buffer size and changing the quality. No matter what I did, it would have the same issue.

It has also occurred to me that when I run Furnace; any other audio processes running will have skipping or just stop entirely.

Also keep in mind that I get no error in the log viewer so I have no idea whats going on, this never happened to me when I would compile the program from source so maybe this is a recent issue.

tildearrow commented 2 years ago

Did you set the log viewer level to "trace"?

H4shtagInclude commented 2 years ago
Screen Shot 2022-07-26 at 01 33 38

Set log viewer to trace mode and I couldn't see anything fishy that would be causing the issue.

tildearrow commented 2 years ago

Try using the latest macOS artifact. If the issue persists, I may need help as I do not have a way to diagnose the issue (can't upgrade to macOS 11 or higher).

djtuBIG-MaliceX commented 2 years ago

I just did a build on my M1 Mac Mini (native AArch64) on macOS Monterey (12.4) against master HEAD (commit 173e9b0df9590536e25b3126c17663cd1b08ffe7). Seems to be working fine for the past hour. Haven't tried the CI builds as I usually run from source myself. :).

FurnaceM1MacMini-27Jul2022

Would be good to know what mac hardware (including any external USB audio devices) and OS version is involved.

Likely might need to start looking at supporting native AArch64 builds if there is not a universal standard of stability with UBs running via Rosetta2 for x86_64->AArch64 across older configurations. Based on the description however, I suspect an external USB audio device is involved if other applications are also affected, in which case is not necessarily a Furnace issue.

EDIT: Using intel x86 macOS artifact from CI, so far seems to be running fine here too so far....

TL;DR, #CannotReproduce #NeedMoreInfo

H4shtagInclude commented 2 years ago

I was using a Macbook Pro 2015, running Mac OS 10.15 (Mojave), I had upgraded to Monterey to see if the issue lied there and as I expected it was still occurring, so either this is a hardware problem with my mac or this is just a very rare issue.

Its so strange too because older versions of Furnace would work fine, it was until the latest release that it started occurring. The only thing I could think of is either I have malware on my mac or the installation of SoundFlower or Blackhole (both audio loopbacks) have something to do with it.

Macbook Pro 2015 (A1502) 'Early' 13' inch Intel i5 5287U (CPU) Intel Iris Graphics 6100 (GPU, Discrete) 8GB DDR3 1600mhz (RAM)

relic374 commented 2 years ago

I get a similar error, so you don't have a virus, but I do also have blackhole installed so that could totally be the issue Btw, I'm on a intel macbook air running big sur (11.1)

djtuBIG-MaliceX commented 2 years ago

That's starting to sound like a Blackhole bug than a Furnace bug. Anyway I don't have those installed on my M1 Mac mini so it's likely a contributor.

tildearrow commented 2 years ago

Try using the macOS arm64 artifact here: https://github.com/tildearrow/furnace/actions/runs/2806559056

H4shtagInclude commented 2 years ago

I might have found the issue. When ever I play a note for some odd reason the audio load just goes up, past 100% which I wasn't aware was possible.

Screen Shot 2022-08-17 at 12 58 24

I had found this on an earlier version of macOS on High Sierra.

tildearrow commented 2 years ago

Is your buffer size too small, or your system too weak? macOS likes to not output audio at all during xruns.

Did you try out the macOS ARM build yet? (I will close this as not fixable otherwise)

H4shtagInclude commented 2 years ago

Oh it might be the buffer size, but I will try the ARM build as well to see if it has the same issue.

tildearrow commented 2 years ago

Closing as not fixable (most likely not a bug in Furnace's side but the used audio loopback's side).

tildearrow commented 1 year ago

Reopening. Other users have reproduced this issue, so it's clearly something wrong in Furnace.

tildearrow commented 1 year ago

I have added a PortAudio backend to Furnace. Please test using latest artifact (in Actions tab).

Go to Settings > Audio and change the backend to PortAudio. Then click OK.

Test whether using BlackHole or any other loopback app works better with PortAudio.

tildearrow commented 1 year ago

Somebody confirmed a few days ago that the PortAudio backend seems to play well. @H4shtagInclude please test.

tildearrow commented 1 year ago

Somebody who was running into this issue as well confirmed that PortAudio fixes it.

I am going to close the issue now.