Re: dsound and portaudio

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: dsound and portaudio

jbeach2646
Not too long ago, I mentioned the audio buffers and size that were necessary for me to use with the fluidsynth portaudio backends 1.1.6 ALL (64-bit) which are downloadable from the sourceforge fluidsynth website.  Some members noted that my settings seemed extremely high for the size, sometimes having to be 2048 in order to achieve playback without clicks, hesitation or delay.
What I have found is this.  With portaudio, not only does the size have to be high, there are clicks, hesitation and delay caused if any change is made during playback or if I attempt to use the
cursor of the mouse to move the horizontal or vertical scroll sliders of the window frame in jOrgan.  This is only true with portaudio.  It is not true with dsound which runs perfectly with no
latency, clicks, hesitation or delay at a lower size 8/1024, for example.
 
Also, with dsound, any number of soundfonts can be assigned to the sound devices.  While this is also true of portaudio, it is not true for ASIO4ALL or Creative ASIO.  Is there a reason for this?
 
Having read a bit about portaudio, my understanding is that it is a cross-platform, audio Input/Output library.  Since I do not perceive any significant advantages to using portaudio and the size
of the audio buffers can be much less with dsound that with portaudio, without any detrimental effects, is there really any advantage to using portaudio?  Or, am I missing something?
 
Thanks.
 
John Beach 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
Reply | Threaded
Open this post in threaded view
|

Re: dsound and portaudio

John Reimer
Administrator
This post was updated on .
jbeach2646 wrote
> I do not perceive any significant advantages to using portaudio

Hi JohnB,

I’m not sure that I really know more about these things than you do, but as
no-one else has replied to your post, at least I’ll have a go. I think your
post raises 3 issues:

1. You are finding that portaudio seems to need larger buffer sizes than
does dsound.
2. Is there a good reason why ASIO4ALL and Creative ASIO do not allow the
use of multiple soundfonts, whereas dsound and portaudio do allow it?
3. What’s the point of using portaudio?

My answers, for what they’re worth, are:
1. I have always found the same thing.
2. Is this really the case?  I thought that what ASIO does not allow, is the
use of multiple audio outputs to separate channels. What one does need to
use then, is WASAPI. I think someone more knowledgeable should chime in.
3. Ever since Windows XP was superseded, Windows has “emulated” dsound
instead of using it directly (whatever that means), and that has meant worse
latency. Portaudio does deliver acceptable latency.

John Reimer




--
Sent from: http://jorgan.999862.n4.nabble.com/jOrgan-User-f999863.html

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
jOrgan-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jorgan-user
Reply | Threaded
Open this post in threaded view
|

Re: dsound and portaudio

jbeach2646
John R.  Thanks for the response to my observations about dsound and
portaudio.  In two copies of the same disposition, I am using dsound with
audio buffers and size of 8/128 with
no problems at all.
In the same disposition, I can use both Creative Labs sound card and the
Realtek Onboard audio which provide about equal quality sound output.  I can
use either dsound or portaudio
with both of these sound devices.

You stated "3. Ever since Windows XP was superseded, Windows has “emulated”
dsound instead of using it directly (whatever that means), and that has
meant worse
latency. Portaudio does deliver acceptable latency."


Does this have anything to do with the change from MMX to SSE(2) with the
Pentium 4 processor?  I built my own PC in 2002 and, at that time, the
processor was a 1.2 Ghz Celeron D
which had MMX (Multi-Media Extension) which was only compatible with Windows
95, 98, 2000, ME, and XP.  It will not work with any of the more recent
operating systems which
require SSE(2).

I also have an older 3.0 Ghz Pentium 4 machine running Windows XP.
Interestingly, this machine will play youtube videos flawlessly, while the
1.2 Ghz Celeron D machine running the same
version of Windows XP Service Pack 4, has all kinds of problems with youtube
videos, related to the difference between the MMX and SSE2 changes.

I do have the fluidsynth>default folder with dsound.portaudio, but in the
Fluidsynth elements, I specify "dsound" rather than portaudio for the
driver.  When the size for portaudio has to be more than ten times that of
dsound, and sound quality difference is negligible, there is no sense to
choosing portaudio.


John B.





























jbeach2646 wrote
> I do not perceive any significant advantages to using portaudio

Hi JohnB,

I’m not sure that I really know more about these things than you do, but as
no-one else has replied to your post, at least I’ll have a go. I think your
post raises 3 issues:

1. You are finding that portaudio seems to need larger buffer sizes than
does dsound.
2. Is there a good reason why ASIO4ALL and Creative ASIO do not allow the
use of multiple soundfonts, whereas dsound and portaudio do allow it?
3. What’s the point of using portaudio?

My answers, for what they’re worth, are:
1. I have always found the same thing.
2. Is this really the case?  I thought that what ASIO does not allow, is the
use of multiple audio outputs to separate channels. What one does need to
use then, is WASAPI. I think someone more knowledgeable should chime it.
3. Ever since Windows XP was superseded, Windows has “emulated” dsound
instead of using it directly (whatever that means), and that has meant worse
latency. Portaudio does deliver acceptable latency.

John Reimer



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
Reply | Threaded
Open this post in threaded view
|

Re: dsound and portaudio

jbeach2646
In reply to this post by John Reimer
John R., the link below contains useful information about direct sound.  In
particular, the "Programming Guide" gives detailed information about buffers
with an entire section on the subject of
buffers.

https://msdn.microsoft.com/en-us/library/windows/desktop/ee416960(v=vs.85).aspx

John B.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
Reply | Threaded
Open this post in threaded view
|

Re: dsound and portaudio

grahamg
In reply to this post by jbeach2646
Hi,

It's mid summer here in South Africa, so I've been away on holiday and
am just starting to catch up on a few things now that we're back
home...

> Having read a bit about portaudio, my understanding is that it is a
> cross-platform, audio Input/Output library.  Since I do not perceive any
> significant advantages to using portaudio and the size
> of the audio buffers can be much less with dsound that with portaudio,
> without any detrimental effects, is there really any advantage to using
> portaudio?  Or, am I missing something

PortAudio is an API library that makes it easier for programmers to
add more Driver backends to their applications. One set of
instructions into PortAudio, and then it depends on what Drivers have
been compiled into PortAudio as to what is available.  As you're using
the PortAudio ALL you have drivers within PortAudio for Dsound,
WDM-KS, WASAPI, and ASIO. Most drivers don't name their connections
with the driver type (some do) so it is hard to know what Driver
you're actually connecting to when using PortAudio ALL. The PortAudio
backends are there for those who have latency issues with native
Dsound and so need to use other Drivers.

Hope that makes sense ;)

GrahamG

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
Graham Goode
Location: Johannesburg, South Africa
VPOs with jOrgan, LinuxSampler, Fluidsynth, SFZ, GrandOrgue, NI Kontakt, and Hauptwerk
Reply | Threaded
Open this post in threaded view
|

Re: dsound and portaudio

jbeach2646
Graham, thanks for your response to my post regarding dsound/portaudio
backends.  Yes, I am using your fluidsynth Portaudio ALL (64-bit), but for
each of the soundfonts in the disposition
I use dsound as the audio driver instead of portaudio.  I am not exactly
sure what this means in terms of any difference except for the fact that the
buffer size with dsound is about 10 times
less (at 128) than it has to be with portaudio (where nothing less than 1536
to 2048 eliminates the clicks, delay, etc. in playback).    I have,
recently, found that dsound works well on both
the Creative Labs soundcard  and Realtek Onboard Audio with the same 8/128
settings with no problems at all.

What concerned me a while ago was that others who were using portaudio could
do so with significantly lower size buffers than I was able to.  I don't
understand the reason for this as
I am running Windows 10 Pro (64-bit)  with 8 Gb RAM and a 2.9 Ghz dual core
processor.

John B.


















"Hi,

It's mid summer here in South Africa, so I've been away on holiday and
am just starting to catch up on a few things now that we're back
home...

> Having read a bit about portaudio, my understanding is that it is a
> cross-platform, audio Input/Output library.  Since I do not perceive any
> significant advantages to using portaudio and the size
> of the audio buffers can be much less with dsound that with portaudio,
> without any detrimental effects, is there really any advantage to using
> portaudio?  Or, am I missing something

PortAudio is an API library that makes it easier for programmers to
add more Driver backends to their applications. One set of
instructions into PortAudio, and then it depends on what Drivers have
been compiled into PortAudio as to what is available.  As you're using
the PortAudio ALL you have drivers within PortAudio for Dsound,
WDM-KS, WASAPI, and ASIO. Most drivers don't name their connections
with the driver type (some do) so it is hard to know what Driver
you're actually connecting to when using PortAudio ALL. The PortAudio
backends are there for those who have latency issues with native
Dsound and so need to use other Drivers.

Hope that makes sense ;)

GrahamG



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
Reply | Threaded
Open this post in threaded view
|

Re: dsound and portaudio

grahamg
Hi John,

I have tried to convey this:
One cannot compare dsound versus PortAudio as Dsound is a Driver and
PortAudio is a driver connection layer. Whatever is being connected
within PortAudio can be compared to dsound, but as PortAudio ALL has
FOUR drivers, the statement:
"the buffer size with dsound is about 10 times less (at 128) than it
has to be with portaudio (where nothing less than 1536 to 2048
eliminates the clicks, delay, etc. in playback)"
is meaningless. PortAudio - what? Dsound? ASIO? WDM-KS? WASAPI?

These are all different Drivers and your audio device's creator has
different settings for each one. A very basic reason for needing a
higher buffer size is that one of these drivers has been poorly
written by the manufacturer. But as you're using PortAudio ALL we
don't know which particular Driver you're using and configuring. Have
you tried another audio device that is available when using PortAudio
in order to test the other Drivers?

Kind regards,
GrahamG

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
Graham Goode
Location: Johannesburg, South Africa
VPOs with jOrgan, LinuxSampler, Fluidsynth, SFZ, GrandOrgue, NI Kontakt, and Hauptwerk
Reply | Threaded
Open this post in threaded view
|

Re: dsound and portaudio

jbeach2646
Graham, thanks for your response.
"But as you're using PortAudio ALL we don't know which particular Driver
you're using and configuring. Have you tried another audio device that is
available when using PortAudio
in order to test the other Drivers?

I have a Creative Labs X-Fi Xtreme Music soundcard in addition to the
onboard Realtek Audio.  The drivers are the latest WDM that are available
from the manufacturers for Windows 10
64-bit.

For "Audio Driver" under Fluidsynth Sound in jOrgan, I specify "dsound".
Then, I specify the device, Speakers Creative SB  X-Fi, or "Speakers,
Realtek High Definition Audio."  I do not use
digital output as I do not have a digital receiver/amplifier (toslink).

If I select "portaudio" for the "Audio Driver" in jOrgan, using your
Portaudio ALL 64-bit, version 1.3, and then, attempt to select "Audio
Device," I will get a red X over the Fluidsynth icon
for that particular soundfont and there is, of course, no connection or
output.   In jOrgan Configuration, Fluidsynth shows the backend "default"
under Fluidsynth.

Previously, I had been able to use "portaudio" as the designated "Audio
Driver" with the same devices specified as when using "dsound,"  although
the buffer "size" was always greater.

It was just this past week that I discovered that I could use "dsound" with
the minimal setting of 8/128 for buffers and size.   I am not sure why this
is the case, although I did switch from
Bernd's fluidsynth portaudio (470?) which may have been 32-bit.  My work PC
is 64-bit and my organ PC is 32-bit, although I have been trying, (without
success) to install Windows 10 64-bit
on the organ PC using the "Create Media Tool" upgrade.  Supposedly, one is
offered the choice between 32 and 64 bit.  I did not get the choice when I
re-installed Windows 10 last week.  Having
both PCs use the same bit operating systems would create less confusion.

John Beach



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user