directsound

Directsound logarithm volume to linear volume slider

自作多情 提交于 2019-12-10 11:39:18
问题 I am developing an music player with DirectX.DirectSound. I have a problem with the volume. The directsound volume is logarithm. This means that with silent sounds, is much more sensitive to small variations in amplitude than with loud sounds. It also means that with a linear volume slider we have a logarithmic sensation of volume variations, and that just doesn't feel right. My question is: How can I make it linear? My code until here is: if (trkBalance.Value == trkBalance.Minimum) {

Playing streamed audio data (C#)

妖精的绣舞 提交于 2019-12-08 04:39:00
问题 I an trying to develop a windows application using C# that can play streamed audio data. Basically, I will have a client application that is responsible for playing different audio files. Currently, from the client application, I am extracting the hardware config param from the file header and then will stream the file data (PCM stream) over network. So is it possible to use the hardware config params sent from client to configure the actual hardware (on the server end) and then give it the

Directsound logarithm volume to linear volume slider

青春壹個敷衍的年華 提交于 2019-12-06 16:44:48
I am developing an music player with DirectX.DirectSound. I have a problem with the volume. The directsound volume is logarithm. This means that with silent sounds, is much more sensitive to small variations in amplitude than with loud sounds. It also means that with a linear volume slider we have a logarithmic sensation of volume variations, and that just doesn't feel right. My question is: How can I make it linear? My code until here is: if (trkBalance.Value == trkBalance.Minimum) { foreGroundSound.Volume = (int)DS.Volume.Min; } else if (trkBalance.Value == trkBalance.Maximum) {

Streaming Data to Sound Card Using C on Windows [closed]

痴心易碎 提交于 2019-12-06 08:10:30
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . As part of a university project I have to do some signal processing and would like to output the results using the PC sound card. The software has to be written in C and needs to work with Windows (preferably 7 and XP). I have found code examples for outputting .wav and similar files, but I am interested in continuously outputting data rather than outputting from files. It is likely that the data for output will

Modify volume gain on audio sample buffer

六眼飞鱼酱① 提交于 2019-12-06 01:11:09
问题 I want to increase a volume on buffer with voice data. The point is I'm using DirectSound and I have one primary and one secondary buffer - all streams mixing is done by hand. In a voice chat all participants can have independent volume levels. I multiply each stream data by a value (gain) and sum it to one buffer. Everything works fine but when I try to multiply data by a value greater than 1.0f - I hear some clipping or what. I've tried using Audacity effect compressor but this doesn't help

Is DirectSound the best audio abstraction layer for Windows?

陌路散爱 提交于 2019-12-05 02:41:23
问题 Is DirectSound the best audio abstraction layer for Windows? Switching my app from a very bad sound implementation, built to a specific chipset, to an abstration layer. App is native Winform, .net 3.5. DirectX/DirectSound is the likely choice, but a little concerned about the overhead. Any other options? Or is it silly to even THINK about anything else? 回答1: DirectSound is not getting the same love from Microsoft today as it got in the past. As far as DirectX is concerned, you may try XAudio2

Modify volume gain on audio sample buffer

二次信任 提交于 2019-12-04 07:27:26
I want to increase a volume on buffer with voice data. The point is I'm using DirectSound and I have one primary and one secondary buffer - all streams mixing is done by hand. In a voice chat all participants can have independent volume levels. I multiply each stream data by a value (gain) and sum it to one buffer. Everything works fine but when I try to multiply data by a value greater than 1.0f - I hear some clipping or what. I've tried using Audacity effect compressor but this doesn't help reducing the strange noise. Probably I should modify gain in some other way? Or just use another post

how to record anything from soundcards?

时光毁灭记忆、已成空白 提交于 2019-12-03 21:00:24
i would like to record any sounds produced in my soundcard. please help, where i can get a freeware component or commercial(trial). delphi7/2009 I have very good experience with the BASS audio library API. Here is a forum thread with C# example , but since the BASS API is procedural and there is a good Delphi API interface, it translates pretty OK. --jeroen http://blogs.msdn.com/b/matthew_van_eerde/archive/2008/12/16/sample-wasapi-loopback-capture-record-what-you-hear.aspx might help try http://sourceforge.net/projects/delphiasiovst/ . there is a component to communicate with the ASIO driver.

Is DirectSound the best audio abstraction layer for Windows?

寵の児 提交于 2019-12-03 20:25:28
Is DirectSound the best audio abstraction layer for Windows? Switching my app from a very bad sound implementation, built to a specific chipset, to an abstration layer. App is native Winform, .net 3.5. DirectX/DirectSound is the likely choice, but a little concerned about the overhead. Any other options? Or is it silly to even THINK about anything else? DirectSound is not getting the same love from Microsoft today as it got in the past. As far as DirectX is concerned, you may try XAudio2 or XACT instead. Some people love those, others hate them. XAudio2 is more low-level, while XACT is rather

C# resample audio from 8khz to 44.1/48khz

霸气de小男生 提交于 2019-12-01 23:53:42
I have encountered a bug in DirectShow .NET where I create a secondary buffer with a sample rate of 8khz, and upon playback, the sound plays back at approx. 8.1khz instead. Googling this, I discovered that I might be forced to upsample the 8khz audio myself to 48khz or 44.1khz depending on the soundcard in the PC. Is there any C# library or generic algorithm I could use for this? Thanks!! Roey For Alvas.Audio see code below byte[] data48khz = AudioCompressionManager.Convert(format8khz, format48khz, data8khz, false); You could always port Secret Rabbit Code to C#? Or how about using the Audio