06 July 2004, 16:55 | #1 |
Amiga lover
|
Wide Stereo Sound
I can code, but it actually makes me to spend A LOT of time understanding how winuae code is done and how it works (though i've downloaded the source code). For who has written the audio part, this would be easy to do.
I'm talking about a WIDE STEREO sound. My idea is the following: Add a slider in the GUI that enables itself when you choose Stereo sound. This slider is the amount of mixing of the two stereo channel, from FULL STEREO (0%) to FULL MONO (100%). This can be done by duplicating the audio channel and playing them reversed and mixed with the normal ones but with the correct volume. So we have 2 channels (L+R) a 50% wide stereo effect is done by reversing and mixing them with the normal channels but with a volume at 50% of the total, this is as an practical example. This can be very useful when you do emulation with headphone. Sometimes (and with some titles) it's very annoying to have a complete stereo sound, it can let you become mad with a lot of headaches! If there are problems, I can try to do it by myself, but it will need much time... Bye bye!!! |
06 July 2004, 17:22 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
Can you write short pseudo-code example?
|
06 July 2004, 21:39 | #3 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,645
|
I just use a little multifx box and put a wide stereo effect on my Amiga.
|
07 July 2004, 15:46 | #4 |
Amiga lover
|
Hi Toni. First of all, this simple effect is the result of a test i've made with goldwave. I've recorded an audio session with winuae and saved it to a wav file. I've copied it onto another file, flipped the channels, lowered the volume and mixed it with the original. It worked! Though is not a "real" wide stereo effect, it's simple and efficient. I've tried to change the volume and the effect changes accordingly.
I think it can be done in two different modes. I'm quite new to directsound, but it's similar to Direct3D so i've just had a look to the documentation. First. Using the actual code, modifying the buffer descriptor to handle 8 hardware channels (or 4 if software) if wide stereo is selected. When the code fills the buffer it puts the data into buffer in an interleaved form. If you write 4 word (16 bit samples) (for example, 4 channels: left1, right1, left2, right2) just replicate them, flipped by channel (so r1, l1, r2, l2) but multiplied by 1.0/"wide_stereo_strenght" (the slider value, to be clear). The data will be lowered in volume and mixed alltogheter with the other data. All done. Second. Duplicating the secondary buffer with IDirectSound8:uplicateSoundBuffer and setting the right volume as usual with SetVolume. The problem is the left-right flipping. You have to lock the duplicated buffer, walk through all the word and flipping them in a 2 by 2 or 4 by 4 fashion. The descriptor of the buffer remains the same. But this buffer must be played simultaneously with the original one. I'd like to know what is the simplest one. I prefer the first one. If you have any question, feel free to ask me! Bye!!! |
07 July 2004, 16:27 | #5 |
Amiga lover
|
I cannot compile winuae sources! This file are missing:
winio.h devioctl.h ntddkbd.h comptbl.h blit.h gl/wglext.h Are this file part of Windows Core SDK (180Mb gulp! 8-S)?? Or do I need something else?? Now i'm trying to download it... cross the finger.. |
07 July 2004, 17:18 | #6 |
Amiga lover
|
Nope...downloaded over 180M from microsoft but i can't see any bits of those files...
Anyone suggests where can i found them?? Thanx! |
07 July 2004, 21:57 | #7 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
devioctl.h, ntddkbd.h: Windows DDK (not downloadable anymore for some reason) workaround: undefine WINDDK in sysconfig.h (=no more cdrom or harddrive support)
winio.h: http://www.internals.com/ (used by Catweasel support). NOTE: winio.h is slightly broken, you need to delete some C++-only lines... blit.h etc..: build and execute gencpu, genblitter etc.. projects to generate them. gl/wglext.h: opengl headers, available from everywhere, just use google Quote:
|
|
07 July 2004, 22:22 | #8 | |||||
Amiga lover
|
Quote:
Quote:
Quote:
Quote:
Quote:
Btw, thank you very much! PS. Keep winuae at this high levels! It's a great piece of software, expecially for an amiga freak like me...! My best compliments for the work...! |
|||||
08 July 2004, 11:08 | #9 |
Amiga lover
|
Downloaded gl extension and Winio from internals.com (fixed the c++ default parameter and extern) and fixed the #define into sysconfig.h but
- A file called paraport.h is missing - The resource identifiers are missing (although it's included!) Is there a particular project setting before I get mad?? Bye! |
08 July 2004, 11:16 | #10 |
Amiga lover
|
For the paraport.h i've fixed it. Simply disabled parallel port emulation in sysconfig.h
But the others remain... |
08 July 2004, 12:10 | #11 |
Posts: n/a
|
Check out this post http://eab.abime.net/showpost.php?p=134889&postcount=14
I tried following the tutorial with a later version (one before this one I think) and almost got it compiling. Maybe if you do you could update the tutorial for the latest sources ? |
08 July 2004, 12:48 | #12 |
Amiga lover
|
Finally compiled! Even without the instruction... there were missing some files here and there, but finally found them!
btw, thanx everybody for the help... It was a nightmare! Now start trying something... |
08 July 2004, 12:54 | #13 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
|
Note that old (pre MSVSNet 2003 or was it 2002) project files are quite out of date..
|
08 July 2004, 15:19 | #14 |
Amiga lover
|
Finally did! And it *works*!
I've altered only one file and one function, Toni, i'm contacting you via mail for the updated code... also you have to adjust the GUI and so on.... Bye! |
10 July 2004, 20:16 | #15 | |
Zone Friend
|
Quote:
The necessity to hack header files manually reminds me of some of my obscure early Linux times... Well Toni wouldn't it be possible to INCLUDE the modified winio.h into winuae source directory henceforth to make things easier for (wannabe) WinUAE hackers? It is PD and/or GPL, so no one should have anything against it. And if, you could contact the author to get the permission (yariv - at - internals - dot - com) I bet he won't forbid you to include the header file. BTW: Is it possible to live without winio.h completely? I think not everyone needs Catweasel (for he/she isn't willing to pay the fee for the hardware), so it would be a reasonable thing to disable it by default and, if need be, #define some constant to include it by request. Last edited by andreas; 10 July 2004 at 20:22. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Missing stereo sound in FS-UAE [Solved] | yesplease | support.FS-UAE | 20 | 22 January 2013 07:11 |
[Bug]Sound - stereo separation 0% = 100% | NoX1911 | support.WinUAE | 3 | 29 May 2011 09:40 |
FOR SALE: Amiga TechnoSound Turbo 2 - Stereo Sound Sampling System | LDR | MarketPlace | 1 | 03 March 2009 12:44 |
Wide Monitor | AlfaRomeo | support.Hardware | 3 | 25 August 2008 10:19 |
Stereo sound problem | andreas | support.WinUAE | 0 | 26 March 2004 19:14 |
|
|