Announcement

Collapse
No announcement yet.

Yet Another (WA)SAPI Output Plugin for Winamp (YASAPI)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • v1.6.4

    What's new?
    • Added a common option in order to define whether 4, 6, or 8 channels should be interpreted as qadrophnic (3.1), 5.1, or 7.1 (disabled) or sorround (3.1 sorround), 5.1 sorround, or 7.1 sorround (enabled), respectively.

    Note: In WASAPI the output format is defined by means of the MS WAVEFORMATEXTENSIBLE structure. In WA you are only informed about the number of channels making up a frame, but not about whether a frame is to be interpreted as sorround (for details cf."yasapi_wfxx.c").

    Links:
    Winamp v5.666 Build 3516 (x86) + in_ffsox + out_yasapi + gen_yas

    Comment


    • Originally Posted by Aminifu View Post
      When listening to music with a multi-channel sound system, some people just want to hear music from all of their speakers. Some don't care if the sounds from each speaker are different and some don't want the sounds to be different. The Yamaha RX-A830 monaural mode is used to make the sounds sent to each speaker (except for the LFE channel) be the same.
      monaural mode: if I get you right does it mean that every channel will be the same? (for example, no stereo at the front channels?)

      Originally Posted by Aminifu View Post
      I prefer to hear different sounds from each of my speakers in my 5.1 system. This is why I use the matrix mixer plug-in.
      So, what's your preferred custom matrix to output 4 channel from stereo?

      Originally Posted by Aminifu View Post
      Knowing the method used to encode a stereo music file (stereo, joint stereo, or dual channel) is also useful to making a successful manual surround sound up-mix. It is not a 'one size fits all' kind of thing.
      Really? I didn't think about this (it was around 15 years(! ) when I dealt with mp3 encoding).

      Originally Posted by pbelkner View Post
      Maiko introduces the wrong notion that up-mixing is part of WASAPI. Indeed it is not (At least I have searched msdn.microsoft.com all over again and again to find at least a hint but without any success). Up-mixing should be implemented as DSP plug-in.
      ...
      Maybe Maiko does it's DSP part right (just for shared mode) but not it's WASAPI part (at least for me it crashes in exclusive mode).

      YASAPI is (and remains) a WASAPI output plugin (as it claims to be)!

      I still don't understand why Maiko has not provided it's DSP part as a DSP plug-in. I even don't understand why Matrix Mixer provides it's capabilities as output plug-in and not as DSP plugin.

      You should think about providing a respective DSP plug-in.
      I understand exactly what you mean by this.

      Originally Posted by pbelkner View Post
      Here are some papers sketching what has to be done:
      I'll take a look at them later, thanks.

      Originally Posted by pbelkner View Post
      What's new?
      • Added a common option in order to define whether 4, 6, or 8 channels should be interpreted as qadrophnic (3.1), 5.1, or 7.1 (disabled) or sorround (3.1 sorround), 5.1 sorround, or 7.1 sorround (enabled), respectively.

      Note: In WASAPI the output format is defined by means of the MS WAVEFORMATEXTENSIBLE structure. In WA you are only informed about the number of channels making up a frame, but not about whether a frame is to be interpreted as sorround (for details cf."yasapi_wfxx.c").
      Wooow! Thanks again for the new feature!

      I've been playing with it this morning, here are the results. In short it doesn't work for stereo sources.

      1. system 5.1 side, yasapi surround on: only fronts sound (although receiver gets 5.1 with the rest being silent channels)
      2. system 4.0 (quadro), yasapi surround on: same as 1., only fronts sound (although receiver gets 5.1 with the rest being silent channels)

      And here comes the interesting part: I tried it out with MatrixMixer as well.

      3. system 5.1 side, matrixmixer 2-2 (4), yasapi surround off: fronts and backs sound, center doesn't (as it should be)
      4. system 5.1 side, matrixmixer 2-2 (4), yasapi surround ON: all speakers sound, even center!!!

      So, what you tried to do is almost correct, but it doesn't effect stereo sources (exactly what we would need )

      Tried it out with Sanear: it uses DspMatrix class to deal with channel mixing, but it doesn't upmix stereo at all in shared mode either. https://github.com/alexmarsev/sanear.../DspMatrix.cpp
      Winamp 5.581 (DirectSound out) + ClockAmp 2.6 + mp3cue 5.0
      MSI GE60(i73630QM,16GB,IntelHD4000(v10.18.10.4358)+GeForceGT650m(2GB,v355.98)+muxless,1920x1080@60Hz,Plextor M5M 256GB SSD,Win8.1x64+MPC-HCx64+LAV+MadVR)+Yamaha RX-830+LG 55LD650(1080p@24/25/30/60Hz)

      Comment


      • Originally Posted by chros View Post
        So, what you tried to do is almost correct, but it doesn't effect stereo sources (exactly what we would need )
        In order to initialize WASAPI you have to provide a WAVEFORMATEX/WAVEFORMATEXTENSIBLE structure (cf. the respective discussion). This includes not only providing nChannels, nSamplesPerSec, and wBitsPerSample, but also dwChannelMask. In YASAPI this is done by the function WFXXSetup(). This is not new.
        PHP Code:
        void WFXXSetup(WAVEFORMATEXTENSIBLE *pwfxxint samplerateint numchannels,
            
        int bitspersampBOOL bSurroundBOOL bFloat)
        {
          
        WAVEFORMATEX *pwfx=&pwfxx->Format;

          
        pwfx->wFormatTag=WAVE_FORMAT_EXTENSIBLE;
          
        pwfx->nChannels=numchannels;
          
        pwfx->nSamplesPerSec=samplerate;
          
        pwfx->wBitsPerSample=bitspersamp;
          
        pwfx->cbSize=(sizeof *pwfxx)-(sizeof *pwfx);
          
        ////
          
        pwfx->nBlockAlign=pwfx->nChannels*(pwfx->wBitsPerSample>>3);
          
        pwfx->nAvgBytesPerSec=pwfx->nSamplesPerSec*pwfx->nBlockAlign;
          
        ////
          
        pwfxx->SubFormat=
              
        bFloat?KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
              
        :KSDATAFORMAT_SUBTYPE_PCM;
          
        pwfxx->Samples.wValidBitsPerSample=pwfx->wBitsPerSample;

          switch (
        pwfx->nChannels) {
          case 
        1:
            
        pwfxx->dwChannelMask
                
        =KSAUDIO_SPEAKER_MONO;
            break;
          case 
        2:
            
        pwfxx->dwChannelMask
                
        =KSAUDIO_SPEAKER_STEREO;
            break;
          case 
        3:
            
        pwfxx->dwChannelMask
                
        =SPEAKER_FRONT_LEFT
                
        |SPEAKER_FRONT_RIGHT
                
        |SPEAKER_LOW_FREQUENCY;
            break;
          case 
        4:
            
        pwfxx->dwChannelMask
                
        =bSurround?KSAUDIO_SPEAKER_SURROUND:KSAUDIO_SPEAKER_QUAD;
            break;
          case 
        5:
            
        pwfxx->dwChannelMask
                
        =SPEAKER_BACK_RIGHT
                
        |SPEAKER_FRONT_RIGHT
                
        |SPEAKER_FRONT_CENTER
                
        |SPEAKER_FRONT_LEFT
                
        |SPEAKER_BACK_LEFT;
            break;
          case 
        6:
            
        pwfxx->dwChannelMask
                
        =bSurround?KSAUDIO_SPEAKER_5POINT1_SURROUND:KSAUDIO_SPEAKER_5POINT1;
            break;
          case 
        8:
            
        pwfxx->dwChannelMask
                
        =bSurround?KSAUDIO_SPEAKER_7POINT1_SURROUND:KSAUDIO_SPEAKER_7POINT1;
            break;
          default:
            
        pwfxx->dwChannelMask=0;
            break;
          }

        What's new is that you now can provide the parameter bSorround from the configuration. That only affects
        • KSAUDIO_SPEAKER_QUAD vs. KSAUDIO_SPEAKER_SURROUND in case of 4 channels,
        • KSAUDIO_SPEAKER_5POINT1 vs. KSAUDIO_SPEAKER_5POINT1_SURROUND in case of 6 channels, and
        • KSAUDIO_SPEAKER_7POINT1 vs. KSAUDIO_SPEAKER_7POINT1_SURROUND in case of 8 channels.

        Before the update the parameter bSurround was simply set to FALSE.

        Whether this has any real effect I can't tell because I don't own a multi-channel system.
        Winamp v5.666 Build 3516 (x86) + in_ffsox + out_yasapi + gen_yas

        Comment


        • Originally Posted by chros View Post
          monaural mode: if I get you right does it mean that every channel will be the same? (for example, no stereo at the front channels?)
          Yes, the monaural mode mixes all the input channels (except for the LFE) together and provides the resulting output to each output channel (except for the LFE). One way to use this mode is to get 6 identical speakers and put 1 in each of six separate rooms (the LFE channel would be left disconnected). You lose the stereo effect, but you still would hear all the sounds present in the left and right stereo input channels


          Originally Posted by chros View Post
          So, what's your preferred custom matrix to output 4 channel from stereo?
          I don't have one. I have only used 3 channel (2.1), five channel (4.1), and six channel (5.1) speaker systems. I assume a 4 channel (3.1) system would provide a front center, front left, front right, and LFE channel.

          The matrix mixer plug-in provides a mixing matrix on it's mixer configuration tab. The 6 possible input channels are listed along the horizontal axis (column headings) and the 6 possible output channels are listed along the vertical axis (row headings). The value entered in the square that corresponds to the intersection of a particular input and output channel determines the nature of that input that is sent to that output. A value of "1" sends the full unchanged input to the output. A value of "0.707" sends the input's frequencies at half their full amplitude to the output. Using a negative value (e.g. "-1" or "-0.707") inverts the frequencies from an input before sending them to an output.


          Originally Posted by chros View Post
          Really? I didn't think about this (it was around 15 years(! ) when I dealt with mp3 encoding).
          I'm reluctant to try to summarize the differences (the technical info is on the internet) between stereo, joint stereo, and dual channel encoding, for fear of providing miss-information. When manually simulating surround sound, in the case where the encoding method results in the left and right inputs containing mostly different sounds, then it is easy to direct these sounds to the desired outputs. In the case where the left and right inputs contain mostly the same sounds with some differences mixed in, then it may be desirable to extract the differences before sending them to the desired output. For example, sending the full left input and the full inverted right input (when both are mostly the same) to the same output channel would result in only the differences between these inputs being output on that channel (since the same, but inverted, frequencies would cancel each other out).


          In 2016, it shouldn't be this difficult to enjoy music the way you want to. But, alas, it still is.
          Winamp v5.9.2.10042 - Quinto Black CT v3.8 skin
          Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system

          Comment


          • Originally Posted by pbelkner View Post
            Maiko introduces the wrong notion that up-mixing is part of WASAPI. Indeed it is not ...
            I agree. Maiko did mix together techniques and technologies. I liked Maiko because it let me resample and/or remix my input files and bypass most of the Windows sound processing, while still letting Windows direct shared or exclusive sound streams to my sound device driver.

            Therefore, I didn't really care what it's developer choose to call it.

            Those who looked 'under the hood' saw that some things were not being handled completely by WASAPI. I'm still hoping Maiko's developer finds his way back to us and finishes his plug-in. It was extremely useful for my Winamp configuration.The last released version of Maiko mostly works well for me (has a few conflicts with the JTFE plug-in), but I have to configure it manually, which is not a user friendly thing to do.

            The latest version of YASAPI's exclusive mode is not working for me. I assume my sound device driver is not providing the necessary support. YASAPI's shared mode (including the new features) is working well (with a few tweaks to my other installed 3rd party sound processing plug-ins).
            Winamp v5.9.2.10042 - Quinto Black CT v3.8 skin
            Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system

            Comment


            • Originally Posted by pbelkner View Post
              Before the update the parameter bSurround was simply set to FALSE.

              Whether this has any real effect I can't tell because I don't own a multi-channel system.
              Thanks, again, for the explanation. Well, this doesn't have an effect at all If you come up with another idea we can test it, since we have it.

              Originally Posted by Aminifu View Post
              Yes, the monaural mode mixes all the input channels (except for the LFE) together and provides the resulting output to each output channel (except for the LFE). One way to use this mode is to get 6 identical speakers and put 1 in each of six separate rooms (the LFE channel would be left disconnected). You lose the stereo effect, but you still would hear all the sounds present in the left and right stereo input channels
              Thanks, I learned something new today

              Originally Posted by Aminifu View Post
              I don't have one. I have only used 3 channel (2.1), five channel (4.1), and six channel (5.1) speaker systems. I assume a 4 channel (3.1) system would provide a front center, front left, front right, and LFE channel.
              Sorry, maybe I wasn't clear enough: I understand Quadrophone under 4 ch (2 fronts and 2 backs) but it can be 4.1 (5 channels) without the center involved.
              What's your preferred matrix in this case? (I used AC3Filter for a long-long time (when I didn't have an AVR, just 4.1 speaker system) so I'm familiar with the concept.)

              Originally Posted by Aminifu View Post
              When manually simulating surround sound, in the case where the encoding method results in the left and right inputs containing mostly different sounds, then it is easy to direct these sounds to the desired outputs. In the case where the left and right inputs contain mostly the same sounds with some differences mixed in, then it may be desirable to extract the differences before sending them to the desired output. For example, sending the full left input and the full inverted right input (when both are mostly the same) to the same output channel would result in only the differences between these inputs being output on that channel (since the same, but inverted, frequencies would cancel each other out).
              Interesting, thanks for the explanation.

              Originally Posted by Aminifu View Post
              In 2016, it shouldn't be this difficult to enjoy music the way you want to. But, alas, it still is.


              Originally Posted by Aminifu View Post
              The latest version of YASAPI's exclusive mode is not working for me. I assume my sound device driver is not providing the necessary support.
              Which OS, hardware do you use? Are neither of the modes working for you? (exclusive-push, exclusive-pull)
              You can create a log, maybe we can see something in it (if you haven't done it yet).
              All of the modes are working for me on Win8.1 with Intel Display Audio driver v6.16.0.3154 (using HDMI).
              On the other side, as for Peter, Maiko doesn't work for me in Exclusive mode.
              Winamp 5.581 (DirectSound out) + ClockAmp 2.6 + mp3cue 5.0
              MSI GE60(i73630QM,16GB,IntelHD4000(v10.18.10.4358)+GeForceGT650m(2GB,v355.98)+muxless,1920x1080@60Hz,Plextor M5M 256GB SSD,Win8.1x64+MPC-HCx64+LAV+MadVR)+Yamaha RX-830+LG 55LD650(1080p@24/25/30/60Hz)

              Comment


              • Originally Posted by Aminifu View Post
                but I still get the exclusive mode issues discussed in post #256 above on my system.
                Please double check whether you have enabled at least Allow applications to take exclusive control of this device in Windows system control (System Control -> Sound -> Properties):

                Winamp v5.666 Build 3516 (x86) + in_ffsox + out_yasapi + gen_yas

                Comment


                • thanks for telling about other(WA)SAPI Output Plugin for Winamp (YASAPI) .
                  braindumps deals exams

                  Comment


                  • Originally Posted by chros View Post
                    Sorry, maybe I wasn't clear enough: I understand Quadrophone under 4 ch (2 fronts and 2 backs) but it can be 4.1 (5 channels) without the center involved.
                    What's your preferred matrix in this case? (I used AC3Filter for a long-long time (when I didn't have an AVR, just 4.1 speaker system) so I'm familiar with the concept.)
                    I use sound pressure measuring instruments (with brownian, pink, and white sound samples) and my ears when setting up my sound system. The instruments let me determine a technically correct 'sweet spot' and then I further adjust for what my ears actually hear.

                    For my 5 channel (4.1) system I configured the left and right inputs to the front left, front right, rear left, rear right, and LFE output channels. I sent the full stereo inputs to their respective front and rear output channels and combined them (at one quarter amplitude) for the LFE channel to the subwoofer. For music, I used the matrix mixer's 'distance from speakers' feature to virtually place the rear channels farther away than the front channels to create a sort of rear echo effect (or maybe it was the other way around, this was some time back). Then I slightly adjusted the gains (up or down) on each channel to get the balanced sound I like with very little chipping. I also used the Windows sound utility to adjust the volume of each channel to compensate for the non-symmetrical placement of my speakers (that the shape of the room my system is in forces me to use) and because I don't hear equally well in my left and right ears.

                    I don't use the 'distance' feature very much anymore and just set the rear channels' volume to be slightly louder or softer than the front, depending on what I'm listening to. After everything is all setup, I use the main volume control on my speaker system's remote to control overall volume (leaving the Winamp volume control set to 100%). While setting up, I have the main volume control just loud enough to hear everything clearly.

                    Yeah, I go thru a lot to get as close as I can (on a relatively small budget) to the quality sound I like.


                    Originally Posted by chros View Post
                    Which OS, hardware do you use? Are neither of the modes working for you? (exclusive-push, exclusive-pull)
                    You can create a log, maybe we can see something in it (if you haven't done it yet).
                    All of the modes are working for me on Win8.1 with Intel Display Audio driver v6.16.0.3154 (using HDMI).
                    My OS, Winamp, and speaker system versions are listed in my signature below. I'm using an old Creative Audigy Platinum soundcard with a driver (http://forums.creative.com/showthread.php?t=723431) modified by Daniel Kawakami (http://www.wired.com/2008/04/daniel_k-who-fi/). Creative never released a full featured driver for Windows Vista and 7 for their older cards. My old Platinum still works great and I'm not going to junk it until it stops working (or it's mobo interface is no longer supported). My mobo's sound chip introduces too much static into it's speaker outputs.


                    Originally Posted by chros View Post
                    On the other side, as for Peter, Maiko doesn't work for me in Exclusive mode.
                    Setting up Maiko properly was not very intuitive and it didn't help that it's matrix and output channel gain configuration panels were not working properly in the last few releases. For some configurations, it was necessary to use music files with the same or re-sampled characteristics that were set in the Windows sound utility's default format option. It also required that the speakers be connected to the correct channels as provided by the computer's hardware. For multi-channel (5.1) speaker systems, some computers are wired to use rear channels and some use side channels. 7.1 hardware has both. Maiko's matrix supported all these arrangements and it was necessary to configure for what was connected (rear to rear or rear to side). However, the channels weren't labelled properly on Maiko's configuration page, so it required asking the developer what was what, which I did several times (all discussed in the very long thread on Maiko in the Winamp Development sub-forum). Sometimes Maiko's auto configure mode could figure things out on it own and sometimes it couldn't.

                    As pbelkner said earlier, Maiko was not a true WASAPI implementation. It was more like a hybrid.
                    Last edited by Aminifu; 6 June 2016, 19:20.
                    Winamp v5.9.2.10042 - Quinto Black CT v3.8 skin
                    Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system

                    Comment


                    • @chros and pbelkner,

                      The diagram shown in this link (http://maiko.elementfx.com/forum/index.php?topic=22.0) and the user manual (http://maiko.elementfx.com/forum/index.php?topic=7.0) may be useful to better understanding Maiko and getting it to work for you.

                      Better descriptions of the mixer (matrix) and balance (channel gain) configuration tabs are in the Maiko thread in the Winamp Development sub-forum (http://forums.winamp.com/showthread.php?t=302485). Some posts in the last 4 pages contain the best info related to the last few releases.
                      Winamp v5.9.2.10042 - Quinto Black CT v3.8 skin
                      Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system

                      Comment


                      • Originally Posted by Aminifu View Post
                        The diagram shown in this link (http://maiko.elementfx.com/forum/index.php?topic=22.0) and the user manual (http://maiko.elementfx.com/forum/index.php?topic=7.0) may be useful to better understanding Maiko and getting it to work for you.

                        Better descriptions of the mixer (matrix) and balance (channel gain) configuration tabs are in the Maiko thread in the Winamp Development sub-forum (http://forums.winamp.com/showthread.php?t=302485). Some posts in the last 4 pages contain the best info related to the last few releases.
                        Many thanks for the links. This confirms what I suspect that Maiko should have better been called a XAudio2/XAPO (rather then WASAPI) plugin.

                        Just to let you now I'm already working on XAudio2/XAPO output and dsp plugins.
                        Winamp v5.666 Build 3516 (x86) + in_ffsox + out_yasapi + gen_yas

                        Comment


                        • Originally Posted by pbelkner View Post
                          ...

                          Just to let you now I'm already working on XAudio2/XAPO output and dsp plugins.
                          That's good news. Hopefully the exclusive mode (if it is going to have one) of your XAudio2/XAPO output plug-in will work better with my modified Creative driver than YASAPI does.
                          Winamp v5.9.2.10042 - Quinto Black CT v3.8 skin
                          Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system

                          Comment


                          • Thanks Aminifu for your explanation.
                            Originally Posted by pbelkner View Post
                            Just to let you now I'm already working on XAudio2/XAPO output and dsp plugins.
                            Originally Posted by Aminifu View Post
                            That's good news. Hopefully the exclusive mode (if it is going to have one) of your XAudio2/XAPO output plug-in will work better with my modified Creative driver than YASAPI does.
                            Woow! Peter, you always surprise us! How is it going? What features will it have?
                            Winamp 5.581 (DirectSound out) + ClockAmp 2.6 + mp3cue 5.0
                            MSI GE60(i73630QM,16GB,IntelHD4000(v10.18.10.4358)+GeForceGT650m(2GB,v355.98)+muxless,1920x1080@60Hz,Plextor M5M 256GB SSD,Win8.1x64+MPC-HCx64+LAV+MadVR)+Yamaha RX-830+LG 55LD650(1080p@24/25/30/60Hz)

                            Comment


                            • Originally Posted by chros View Post
                              How is it going? What features will it have?
                              Don't expect any new features. The adventure is to explore a new technology. XAudio2 is a framework for streaming audio. In it's essence it can do nothing. Like all frameworks it's just a set of interfaces and some semantics about how they should interact. In order to make development possible there are some default implementations available.

                              The XAudio2 output plugin is close to be finished. It will be released in the next few days.

                              Release Early, Release Often!
                              Winamp v5.666 Build 3516 (x86) + in_ffsox + out_yasapi + gen_yas

                              Comment


                              • I forgot to mention that there are 2 apps called matrix mixer. Both can be used to remix stereo input channels to multiple output channels. To clear up any possible confusion, the full name of the one I'm using is "winamp matrix mixer" (https://sourceforge.net/projects/winampmatrixmix/). It contains an output plug-in stacker that is used to direct it's output to another output plug-in. It's configuration window contains 5 tabs and looks like the image below (click on the image to see a larger version).

                                Click image for larger version

Name:	winampmatrixmixer.jpg
Views:	1
Size:	108.9 KB
ID:	4463989

                                The other app doesn't contain an output plug-in stacker and it's configuration window has 4 tabs which looks like the image below (click on the image to see a larger version).

                                Click image for larger version

Name:	matrixmixer.jpg
Views:	1
Size:	138.0 KB
ID:	4463990

                                The mixer and gains tabs in both apps look similar and function the same because both apps are based on the AC3Filter app.
                                Winamp v5.9.2.10042 - Quinto Black CT v3.8 skin
                                Windows 11 Home 64-bit v22H2 desktop - Logitech Z906 5.1 speaker system

                                Comment

                                Working...
                                X
                                😀
                                🥰
                                🤢
                                😎
                                😡
                                👍
                                👎