david2dia / soundflower

Automatically exported from code.google.com/p/soundflower
GNU General Public License v2.0
0 stars 0 forks source link

Weird Sound Artefacts #24

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Install Soundflower 1.4.3 with Soundflowerbed
2. Use (2ch) as Main Output, so I can use the Volume controls on my Audio DJ 8
3. In Audio Setup, I use 96kHz and 32 Bit (well actually the Soundcard does
only 24 bits, but there is only this choice) It does not seem to matter
which channel is used on the Audio Hardware.

What is the expected output? What do you see instead?

After a while, the Sound is completely muted or I can hear some strange
humming distorted nois which sound like a Buffer Overrun. In fact, with a
smaller Buffer, the Artifacts can be heard sooner and generally with a
higher pitch. For example, with a Buffer Size of "2048" it takes about one
hour before the Artefacts appear (seems to be a fixed amount of time), with
a buffer size of "64" its only a matter of minutes.

All in all, this Bug reminds me of "Issue 21" - so this might not be
related to my Audio Hardware

I can "fix" the Bug by just selecting any Buffer Size when the error
appears, but of course it will reappear a certain amount of time (depending
again on Buffersize).

What version of the product are you using? On what operating system?

I use Soundflower 1.4.3 in Mac OS X 10.5 

Please provide any additional information below.

Audio Hardware: Audio DJ 8 from Native Instruments

Original issue reported on code.google.com by kuderm...@alphanull.de on 18 May 2009 at 4:27

GoogleCodeExporter commented 8 years ago
Trying to look into the source of this problem and why affects some users but 
not others...  

Most of the comment and reports of this problem are missing information.  In 
order to be helpful 
they need to include, at a minimum, the following:

1. The signal path.  e.g.  Live 5.1.1 -> SoundFlower -> Max/MSP 5.1.3 -> 
built-in output

2. The sample rates and vector/buffer/block sizes used by all programs in the 
signal path

3. Hardware configuration (many have included this, which is a good start)

4. Exact and detailed steps on how to reproduce.  Vague instructions or those 
missing steps don't 
help.

Thanks everyone for your help!  Once the problem can be pinned down then there 
is hope of trying 
to fix it.

Original comment by 74obje...@gmail.com on 9 Mar 2010 at 7:06

GoogleCodeExporter commented 8 years ago
Having now spent a couple of days on this problem, I am only able to reproduce 
when I use 
a bogus setup.  I am unable to reproduce when everything is set up properly: 

- all involved applications are using the same driver (e.g. Built-in or Apogee 
Duet or 
whatever) and not mixed drivers
- all involved applications are running at the same sample rate
- all involved applications are using the same vector size
- the vector size is reasonable (i.e. 512 is reasonable, 32 is not)

This is with a beta build of Soundflower 1.5.2, so it's possible that some of 
the issues 
involved are also solved in-part by this new version, which I'll post shortly.

Original comment by 74obje...@gmail.com on 12 Mar 2010 at 4:53

GoogleCodeExporter commented 8 years ago
Tried with Soundflower 1.5.2 beta and the issue appears in it too.

The signal path is VLCPlayer -> SoundFlower -> Native Instruments Audio 2 DJ
Buffer size is 512 or 1024 (with 1024 it takes more time to reproduce)

MacBook MB404RS/A

It's quite easy to reproduce the problem, just listen to music for 5 minutes.

BTW, I'm familiar to programming, so I can help you collect logs if you'd like 
this.

Original comment by vita...@gmail.com on 12 Mar 2010 at 10:44

GoogleCodeExporter commented 8 years ago
Forgot about OS: Snow Leopard 10.6.2

Original comment by vita...@gmail.com on 12 Mar 2010 at 10:45

GoogleCodeExporter commented 8 years ago
ok.
tested again. 

10.6.3 latest developer build, stared up in 64 bit mode
soundflower 1.5.2b1
early 2008 mac pro 2 x 2,8 GHz Quad-Core Intel Xeon, 8GB DDR2, 6 GB striped raid
firewire audio with Motu 828MK3 and Motu UltraLite

simple audiopath 1 : iTunes > soundflower 2CH 1 + 2 > Motu 828MK3 CH 13 + 14 
(SPDIF)

simple audiopath 2 : Soundtrack > soundflower 2CH 1 + 2 > Motu Ultralite CH 5 + 
6 (ANALOG)

all set to 48 kHz, soundflower buffer 512

it takes longer to reproduce with  bigger buffer, but it will happen. 
it also happens if I select any other combination of channels on the output 
devices.

after 12-13 minutes (longer than ever before, some progress at least) : audio 
stalls in last frequencies, providing an almost continuous tone.

good luck, we all have our fingers crossed that this might get fixed eventually.

Original comment by j...@kunstonline.info on 13 Mar 2010 at 4:07

GoogleCodeExporter commented 8 years ago
10.6.2 (32bit), MacPro 2.66 Dual Listening to iTunes, Safari, various. (normal 
use) Stopwatch timed, not accurate.

system audio settings: Use This Device for Sound Output / Input = Soundflower 
(2ch-32bit) @44.1kHz->EchoAudioFIre(12ch-24bit) @44.1kHz, clock 
source = Mac

buffer: 256 = 3:25  to meltdown
buffer: 512 = 6:39  to meltdown
buffer: 1024 = 13:15 to meltdown

system audio settings: Use This Device for Sound Output / Input = Soundflower 
(2ch-32bit) @44.1kHz->EchoAudioFIre(12ch-24bit) @96kHz, clock 
source = Mac

buffer: 256 = 1:59 to meltdown
buffer: 512 = 3:09 to meltdown
buffer: 1024 = 6:15 to meltdown

system audio settings: Use This Device for Sound Output / Input = Soundflower 
(2ch-32bit) @96kHz->EchoAudioFIre(12ch-24bit) @44.1kHz, clock 
source = Mac

buffer: 256 = 1:42 to meltdown
buffer: 512 = 3:10 to meltdown
buffer: 1024 = 6:12 to meltdown

let me know what other factors to compare, t. no problem consistently 
reproducing it for ya.

Original comment by razielpa...@gmail.com on 18 Mar 2010 at 2:41

GoogleCodeExporter commented 8 years ago
These last two comments don't indicate what software is getting the sound out 
of 
Soundflower and sending to the hardware, which seems to imply that you are 
using 
SoundflowerBed?  

I just tried SoundflowerBed and I _can_ reproduce the problem.  So this looks 
like a bug 
not in Soundflower, but in SoundflowerBed.  Soundflower itself seems to work 
fine with 
other applications (such as Max/MSP) at the end of the chain.

Original comment by 74obje...@gmail.com on 18 Mar 2010 at 12:31

GoogleCodeExporter commented 8 years ago
I too am suffering from this problem. And Yes I am using soundflowerbed to 
route the
audio to my audio interface (Mbox 2 USB).

I am running OSX 10.6.2 , Mac Pro. 

Signal flow is Logic Pro 9.1 - soundflower - Soundflowerbed - Mbox 2 output.

Buffer is set to 512 samples in all applications. 

I get about 5 minutes or so before I have to reselect my hardware from 
soundflowerbed
to get sound again. This happens every time I use soundflower 2ch or 16ch as the
audio interface for Logic Pro. 

Also, when I first start soundflowerbed although my audio interface is already
selected in soundflowerbed it does not route audio to it until I select the 
interface
again.

Thanks

Original comment by reuben%s...@gtempaccount.com on 19 Mar 2010 at 5:13

GoogleCodeExporter commented 8 years ago
Yes. Using soundflowerbed. I will try with max tonight. 

Original comment by j...@kunstonline.info on 19 Mar 2010 at 11:34

GoogleCodeExporter commented 8 years ago
I was also using SFB.... 

Although have given up on this software for now and have found a work around 
for my particular set up.

Original comment by randomge...@btinternet.com on 21 Mar 2010 at 8:41

GoogleCodeExporter commented 8 years ago
using previous config, the problem exists when using SFB, not with MAX.

Original comment by j...@kunstonline.info on 23 Mar 2010 at 6:46

GoogleCodeExporter commented 8 years ago
I *have* the problem with the following signal path:
Traktor Pro => Soundflower => Ableton Live 8 => Audio8 DJ.
I *do not have* the problem with the following signal paths:
(i)  Traktor Pro => Audio8 DJ
(ii) Ableton Live 8 => Audio8 DJ
(iii) Traktor Pro => Soundflower => Live 8 => Internal Sound Card

It appears that something about my configuration that involves Soundflower 
finally
routed through the Audio8 DJ driver seems to cause this issue. 

Original comment by vamshi.r...@gmail.com on 23 Mar 2010 at 9:02

GoogleCodeExporter commented 8 years ago
I have a similar setup like vamshi.raghu, and I also have exactly the same 
behaviour
like all people here reported (noise after certain periods of time). Might add 
that I
am also using Soundflower, so the Setup

Anyapp => Soundflower => Audio DJ 8

produces the problems stated above by me and other people. Should be really 
easy to
reproduce and it also seems to occur on certain types of sound hardware, 
apparently
including all Native Instruments audio interfaces, but also many others. Maybe 
all of
these cards have a similar chipset?

Original comment by kuderm...@alphanull.de on 24 Mar 2010 at 8:25

GoogleCodeExporter commented 8 years ago
I'm really happy to see some progress on this issue, and also come 
cleanup/consolidation of the reports.

I'll try to re-verify on my current setup (Mac Pro with Apogee Ensemble) ASAP, 
and 
verify whether it happens just with SoundflowerBed involved, or not.

Original comment by paulrpo...@gmail.com on 25 Mar 2010 at 4:26

GoogleCodeExporter commented 8 years ago
The same bug occurs in the new Soundflower 1.5.2 Beta1. Too sad...

Original comment by felip...@gmail.com on 20 Apr 2010 at 12:46

GoogleCodeExporter commented 8 years ago
Soundflower was awesome when it worked. I was able to control the System Volume 
from
my computer while using a firewire device through Soundflowerbed. Could we get 
the
priority escalated from medium please?

-R

Original comment by ryanrhe...@gmail.com on 3 May 2010 at 8:31

GoogleCodeExporter commented 8 years ago
I'm currently working on fixing this issue myself. I seem to have narrowed down 
where the problem is occurring. If any of the maintainers 
have any input to my observations, that would be helpful.

In the InputIOProc of AudioThruEngine, input audio is stored in the ring 
buffer, and in the OutputIOProc, it is fetched. After a certain 
period of time, every attempt to fetch from the ring buffer in the OutputIOProc 
fails because the times passed in fall outside of the range 
of the buffer. So say the buffer is 96000 samples big (48khz / sec @ 2 
seconds). On my sound card, the safety offset is 50, so it will 
consistently fail trying to fetch 95950 - 96462 (462 greater than the buffer) 
when buffer size is set to 512. Not quite sure what is 
causing this, but it is pretty consistent and has to do with the ring buffer. 
If I change the source to bypass the ring buffer, writing directly 
to This->mWorkBuf in the InputIOProc and reading directly from This->mWorkBuf 
in the OutputIOProc, the problem disappears, though 
there is a bit more static than normal because there is no safety offset.

Would any of the maintainers care to comment? I'll submit the patch if the 
solution is found.

Original comment by bryan.ma...@gmail.com on 28 May 2010 at 2:18

GoogleCodeExporter commented 8 years ago
I normalized the buffer times, and this is the error I'm getting from 
AudioRingBuffer::Fetch():

error - buffer times: 0 - 96000, reading for 95987 - 96051
This same error repeated > 1000 times

Original comment by bryan.ma...@gmail.com on 28 May 2010 at 2:34

GoogleCodeExporter commented 8 years ago
Thanks for working on this!  Please do submit a patch if/once you get a 
solution working.  I'd be more than 
happy to build up new installers as soon as this issue is resolved.

Original comment by 74obje...@gmail.com on 28 May 2010 at 3:23

GoogleCodeExporter commented 8 years ago
I'm also glad to hear there is progress in...and hope this issue will be solved 
soon...If we we can help with any 
further information, let us know...

just to add my stats:

Mac Pro Quad Core, 6 GB 1066 MHz DDR3,
Mac OS X 10.5.8

audio path 1: Final cut Pro -> soundflowerbed (1.5.1, 2ch) -> Blackmagic Audio
audio path 2: Final cut Pro -> soundflowerbed -> Level Meter (Spectre)

Buffer size is 2048, not editable in FCP, Signal is 48 KHz, 32 Bit, 2 Ch

Original comment by sonkeelb...@gmail.com on 7 Jun 2010 at 2:04

GoogleCodeExporter commented 8 years ago
I've been working on this for a few days now.
Here's what I found out.

0) There are quite a few simple typo bugs in SoundflowerBed, those are trivial 
to fix.
     SIntXX, in audio app, there really isn't a lot of call of Signed Numbers (unless they are PCM data in float) I changed all that to UIntXX
     There in [AppController readDevicePrefs], val should really be unsigned long
     [AppController bufferSizeChanged16ch], should never use data from 2ch

1) The fundamental problem with this issue (24) is that you have two devices 
running in parallels without any effort to keep the two clocks in sync (beyond 
setting the sample rate the same). Which, in theory is enough, but in practice 
those two clocks can drift apart, especially if one of them is driven by 
different hardware than other.

Solution to this is to either:
a) Keep track of drift between the two clocks and compensate by either 
re-sampling the data on the fly (hard) or insert some noise by 
duplicating/dropping sample frames (easy, but bad).
b) Find a way to sync those clocks. But without actually having sync source 
that you can physically tie two hardware together, this might not be possible.
c) Rewrite AudioThruEngine to use AudioQueue

I am trying to do c). I will post again if I get anywhere with it.

Original comment by Jyin.Sph...@gmail.com on 8 Jun 2010 at 1:28

GoogleCodeExporter commented 8 years ago
Thank you very much, @Jyin.Spheal. We all appreciate your effort.

Original comment by felip...@gmail.com on 8 Jun 2010 at 1:31

GoogleCodeExporter commented 8 years ago
Jyin.Spheal,

Can you release the version of Soundflowerbed with the typo bugs fixed?

-R

Original comment by ryanrhe...@gmail.com on 8 Jun 2010 at 1:31

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I don't have write access to SVN.
Besides, my code-base is currently a utter mess.

Original comment by Jyin.Sph...@gmail.com on 8 Jun 2010 at 1:43

GoogleCodeExporter commented 8 years ago
AudioQueue is a bust... not really designed for this sort of thing.
Latency on AQ is in the order of 2-300 ms in i7 system.

Moving off to Plan d)....

Original comment by Jyin.Sph...@gmail.com on 10 Jun 2010 at 12:02

GoogleCodeExporter commented 8 years ago
what was plan d? i only saw up to c :)
i've been working on your plan a & b, as I believe it's really the best way to 
implement it to give the most versatility. I've identified the exact problem 
and understand how it's drifting apart, i'm carefully considering the solution.

i'd be interested to see the code you've implemented for audio queue services, 
perhaps you could email what you have?

bryanmatteson <at> hotmail <dot> com

Original comment by bryan.ma...@gmail.com on 10 Jun 2010 at 12:29

GoogleCodeExporter commented 8 years ago
The code I have for AQ is not functional, it is *just* functional enough to 
measure latency.
As to Plan D... I am trying out AggregateDevice.

Basically, I will tie the input and output device into single aggregate device 
and use one IO proc to do the input/output in single call.

Original comment by Jyin.Sph...@gmail.com on 10 Jun 2010 at 4:33

GoogleCodeExporter commented 8 years ago
So, Plan D seems to be coming along well.
I got prototype running on my system as I type.

I've just applied to this group, hopefully, by the time I get some testing done 
on this code-base, I will have write access to SVN.

Original comment by Jyin.Sph...@gmail.com on 12 Jun 2010 at 8:27

GoogleCodeExporter commented 8 years ago
I've ran into a problem I can't seem to fix.
Every 30sec or so (with 2048 buffer) I get a pop in the sound.

Original comment by Jyin.Sph...@gmail.com on 15 Jun 2010 at 11:38

GoogleCodeExporter commented 8 years ago
Only on 2048 buffer? Or is this the case on, say, a 64 buffer as well?

Original comment by bryan.ma...@gmail.com on 15 Jun 2010 at 11:43

GoogleCodeExporter commented 8 years ago
64 buffer is unusable in my system (10 channel output).
2048 seems to give best result in terms of sound quality.

Original comment by Jyin.Sph...@gmail.com on 16 Jun 2010 at 3:27

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Awesome to see some progress on this!  As for getting it into SVN, there are a 
variety of options.  The easiest way is if you are using Github @ 
http://github.com/tap/Soundflower .  Usually the bleeding edge is there and the 
stable changes are then merged to Googlecode's SVN.  

Otherwise we could get you svn access on googlecode and maybe this could go in 
a branch initially and then we can merge it to trunk after testing/review?  To 
go this route, drop me an email.

Original comment by 74obje...@gmail.com on 19 Jun 2010 at 10:48

GoogleCodeExporter commented 8 years ago
Thanks, I will look into the qithub, the noise issue is still there, and I got 
bit busy with work at the moment.
I will get back to it when things quiets down.

Original comment by Jyin.Sph...@gmail.com on 21 Jun 2010 at 8:11

GoogleCodeExporter commented 8 years ago
Any news, folks?

Original comment by felip...@gmail.com on 11 Jul 2010 at 10:14

GoogleCodeExporter commented 8 years ago
Any news, folks?

Original comment by fotosho...@gmail.com on 15 Jul 2010 at 7:42

GoogleCodeExporter commented 8 years ago
I have a similar issue - I get messed up audio buffers (ie a sine wave looks 
chopped up and rearranged - see screenshot) after ~ 5-10 min. I am not using 
SFBed's monitoring feature, but instead I'm aggregating Soundflower and my MOTU 
Ultralite. Everything has 128 sample buffers. Ultralite is clock source, 
resample not checked on either. Would love to see this fixed! For now I am 
using JackOSX instead.

Original comment by arvi...@gmail.com on 24 Jul 2010 at 12:40

Attachments:

GoogleCodeExporter commented 8 years ago
Has anything else been done on this issue?  I used to yse SF and SFB about two 
years ago and never had a problem like this one.  Today I needed to use it for 
a project and can up with the same issues everyone above has had.  My Setup:

Mac Pro 3,1, 8 GB Dual quad
Routing:  Kore 1 controller out 1/2 mapped to SF ch 1/2===> SF ====> NI 
Maschine input 1/2 mapped to SF input 1/2  with soundflower bed ch1/2 mapped to 
Kore1 controller out 3/4 (headphone outputs).  Maschine external output mapped 
to SF ch2 which is mapped in soindflower bed to ch1/2 on the Kore1 controller AI

Whenever going into the audio menu of either app the sound would stop. If 
playing a sequence on maschine the sound would turn into a nasty buzzing 
simialr to an audio loop).  Saw above manywre having problems with NI audio 
ints, so I switched the device to my Alesis USB 16.

Pretty much got the same results except no buzzing.  The sound would no longer 
play throughthe AI, but I did confirm that SF will routing the audio cleanly.  
The audio routed from Kore into Maschine was showing on the Maschines meters.  
I hit record and got a waveform when done.  Reset SFB and played back the 
sampled wav and it was clean, so it appears that the SFB connection to the AI 
was disonnected/dropped/hung?? Yet the audio channel between the apps was still 
good.... not useable, but contributing my experiences.

Original comment by wakko19...@gmail.com on 25 Aug 2010 at 9:19

GoogleCodeExporter commented 8 years ago
Sorry, I've been tied up with other project and haven't had a lot of time to 
work on this.
I got aggregate code working, but I still get noise.

There may be some thing in the driver itself.

If I find time, I will insert some NSLog and see what I can find.

Original comment by Jyin.Sph...@gmail.com on 31 Aug 2010 at 6:10

GoogleCodeExporter commented 8 years ago
Any news, folks?

Original comment by fotosho...@gmail.com on 7 Oct 2010 at 4:54

GoogleCodeExporter commented 8 years ago
Is SoundFlower dead? C'mon, guys!

Original comment by felip...@gmail.com on 7 Oct 2010 at 4:56

GoogleCodeExporter commented 8 years ago
Yeah - soundflower is such a great concept and so useful and simple, but I've 
had to stop using it because of this issue. If I knew what I was doing in this 
realm, I'd help out.

Original comment by arvi...@gmail.com on 7 Oct 2010 at 1:50

GoogleCodeExporter commented 8 years ago
Does anyone knows any alternative to this otherwise great piece of software ?
I've tested Jack OSX but experienced the same issue...
Soundfloweer is way more simple to use and configure.
Would love to see it work again.

Original comment by mantoine...@gmail.com on 8 Oct 2010 at 1:04

GoogleCodeExporter commented 8 years ago
in my experience jackOSX works perfectly fine if you set it up right - its just 
that it is more complex, requires remembering to turn it on before launching 
your software (doh!), the connections GUI is not very good, and it seems to eat 
CPU for breakfast. The last is the reason I don't use it when performing - i 
get pops and clicks in the audio doing much less audio processing than I would 
if i was not using jack. For now I've been getting around this by using 
hardware loopback in my MOTU ultralite, but its not ideal - only 4 chans (2 
chans in cuemix + 2 chans SPDIF loopback) and it means I am glued to that 
hardware.

Original comment by arvi...@gmail.com on 8 Oct 2010 at 2:10

GoogleCodeExporter commented 8 years ago
Issue 79 has been merged into this issue.

Original comment by 74obje...@gmail.com on 15 Oct 2010 at 6:35

GoogleCodeExporter commented 8 years ago
same issue :-( after six hour with nrv10 and mac mini.

Original comment by michele....@gmail.com on 28 Oct 2010 at 8:38

GoogleCodeExporter commented 8 years ago
This issue is over a year old. What's the status?

Original comment by felip...@gmail.com on 15 Dec 2010 at 6:01

GoogleCodeExporter commented 8 years ago
The status seems to be "We simply do not care."

Has anyone found another solution yet?

Original comment by michael....@gmail.com on 16 Dec 2010 at 12:52

GoogleCodeExporter commented 8 years ago
I'm willing to PAY someone to actually fix this. Don't have huge amounts of 
cash to spare, but something. I know first hand how hard this stuff is to debug 
when it's in realtime and requires time before the bug manifests… I would 
work on it myself, I just know nothing about coreaudio and not sure i want to 
spend the time learning it. Or maybe Apple has fundamentally broken something 
and a fix is just not possible? (that would not be particularly unusual as I 
understand it)

Original comment by arvi...@gmail.com on 16 Dec 2010 at 2:11