flat assembler
Message board for the users of flat assembler.

Index > Windows > How apply two sounds waves buffers on SSE ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1526
Roman 01 Feb 2016, 15:03
I have two sound buffers.
In sound buffer value from -1.0 to 1.0.

How apply two sounds waves buffers on SSE ?
Post 01 Feb 2016, 15:03
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1526
Roman 01 Feb 2016, 15:05
I do like this:
Code:
macro Im chX,chY { local l1,l2,l3
                   comiss  chX,xmm0
                   jb      l1
                   comiss  chY,xmm0    ;xmm2
                   jb      l2
                   maxss   chX,chY
                   jmp     l3
               l1: comiss  chY,xmm0
                   jae     l2
                   minss   chX,chY
                   jmp     l3
               l2: addss   chX,chY
               l3:
                 }
macro ApplyC {
               movss   xmm1,dword [eax]
               movss   xmm2,dword [ebx]
               movss   xmm3,dword [edx]
               movss   xmm4,dword [ebp]
               Im      xmm1,xmm2
               Im      xmm3,xmm4
               Im      xmm1,xmm3
               movss  [edi],xmm1
               movss  [edi+4],xmm1
               add     edi,8
               add     ebp,8
               add     eax,8
               add     edx,8
               add     ebx,8
             }                    
    
Post 01 Feb 2016, 15:05
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.