rdp / virtual-audio-capture-grabber-device

free audio capture device to capture all the "wave out sound" that is playing on your speakers (i.e. record what you hear) for Windows Vista+. Releases downloadable in this package:
https://github.com/rdp/screen-capture-recorder-to-video-windows-free
Other
578 stars 181 forks source link

no audio on silence #10

Closed roman-miniailov closed 6 years ago

roman-miniailov commented 10 years ago

Hi

It's a serious problem that audio not comes if no audio output device used, that's must be a silence, without this it's not a filter that can be used in real application and be sure that all ok.

roman-miniailov commented 10 years ago

hm, using binary version of screen capture tool all ok... can you help? maybe old filter code in repository?

roman-miniailov commented 10 years ago

hm, worked normally usually, with a silence, but first time of filter usage is not... any ideas?

rdp commented 10 years ago

It should fail if nothing is playing, could you double check? do the audio capturer binary dll's differ at all?

On Mon, Jul 14, 2014 at 2:16 PM, roman-minyaylov notifications@github.com wrote:

hm, worked normally usually, with a silence, but first time of filter usage is not... any ideas?

— Reply to this email directly or view it on GitHub https://github.com/rdp/virtual-audio-capture-grabber-device/issues/10#issuecomment-48953669 .

roman-miniailov commented 10 years ago

fail if nothing is played? that's a very strange idea... nothing is silence, that's ok...

yes, i tried your binary and build from source code

rdp commented 10 years ago

patch welcome for this one...I haven't been able to figure out an awesome work around yet :|

On Tue, Jul 15, 2014 at 11:16 AM, roman-minyaylov notifications@github.com wrote:

fail if nothing is played? that's a very strange idea... nothing is silence, that's ok...

yes, i tried your binary and build from source code

— Reply to this email directly or view it on GitHub https://github.com/rdp/virtual-audio-capture-grabber-device/issues/10#issuecomment-49063960 .

roman-miniailov commented 10 years ago

i've made silence generation (output to DirectSound, in external code), this workaround worked normally.

rdp commented 10 years ago

OK good to know. Code snippet would be good too :)

On Wed, Jul 16, 2014 at 7:23 AM, roman-minyaylov notifications@github.com wrote:

i've made silence generation (output to DirectSound, in external code), this workaround worked normally.

— Reply to this email directly or view it on GitHub https://github.com/rdp/virtual-audio-capture-grabber-device/issues/10#issuecomment-49164092 .

roman-miniailov commented 10 years ago
public class NASilenceOutput
{
    private DirectSoundOut waveOut;

    public void Start()
    {
            SilenceWaveProvider32 waveProvider = new SilenceWaveProvider32();
            waveProvider.SetWaveFormat(44100, 2); // 16kHz mono
            waveProvider.Frequency = 125;
            waveProvider.Amplitude = 0.25f;
            waveOut = new DirectSoundOut();
            waveOut.Init(waveProvider);
            // waveOut.DesiredLatency = 10;
            waveOut.Play();
    }

    public void Stop()
    {
        if (waveOut != null)
        {
            waveOut.Stop();
            waveOut.Dispose();
            waveOut = null;
        }
    }

}

public class SilenceWaveProvider32 : WaveProvider32
{
    public override int Read(float[] buffer, int offset, int sampleCount)
    {
        return sampleCount;
    }
}

Using .Net / NAudio. So, specific, but idea is clear - generate sound (really fill by 0) and send to DirectSound output. Can be done in C++.

rdp commented 10 years ago

dang, too bad I'm stuck with C++ for this .dll ...

roman-miniailov commented 10 years ago

Oh, that's a simple idea - just generate sound (silence) and made output to DirectSound speakers. Can be done in C++. (Not WaveOut, we have side effect - volume control goes crazy in Windows 7+, if any another sound output present in application)

mca64 commented 10 years ago

i had this problem earlier. Playin since fixed many problems for virtual-audio-capture-grabber-device like stream stops or audio desync. Also now is save to control volumne in Winamp, earlier this could crash stream

mca64 commented 10 years ago

i used this for few months and works great for audio capturer, but i made this in Delphi :P http://pastebin.com/QVwXvs4h

rdp commented 6 years ago

Hopefully fixed internally now (finally).