English Amiga Board


Go Back   English Amiga Board > Requests > request.UAE Wishlist

 
 
Thread Tools
Old 06 July 2004, 16:55   #1
xtc
Amiga lover
 
xtc's Avatar
 
Join Date: Jun 2004
Location: Italy
Age: 46
Posts: 23
Send a message via MSN to xtc
Lightbulb 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!!!
xtc is offline  
Old 06 July 2004, 17:22   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,510
Can you write short pseudo-code example?
Toni Wilen is offline  
Old 06 July 2004, 21:39   #3
Amiga1992
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.
Amiga1992 is offline  
Old 07 July 2004, 15:46   #4
xtc
Amiga lover
 
xtc's Avatar
 
Join Date: Jun 2004
Location: Italy
Age: 46
Posts: 23
Send a message via MSN to xtc
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!!!
xtc is offline  
Old 07 July 2004, 16:27   #5
xtc
Amiga lover
 
xtc's Avatar
 
Join Date: Jun 2004
Location: Italy
Age: 46
Posts: 23
Send a message via MSN to xtc
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..
xtc is offline  
Old 07 July 2004, 17:18   #6
xtc
Amiga lover
 
xtc's Avatar
 
Join Date: Jun 2004
Location: Italy
Age: 46
Posts: 23
Send a message via MSN to xtc
Nope...downloaded over 180M from microsoft but i can't see any bits of those files...

Anyone suggests where can i found them??

Thanx!
xtc is offline  
Old 07 July 2004, 21:57   #7
Toni Wilen
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:
Duplicating the secondary buffer with IDirectSound8uplicateSoundBuffer
Uh... I guess this breaks everything because DirectSound does not always work as documented and most sound card drivers are simply crap
Toni Wilen is offline  
Old 07 July 2004, 22:22   #8
xtc
Amiga lover
 
xtc's Avatar
 
Join Date: Jun 2004
Location: Italy
Age: 46
Posts: 23
Send a message via MSN to xtc
Thumbs up

Quote:
Originally Posted by Toni Wilen
devioctl.h, ntddkbd.h: Windows DDK (not downloadable anymore for some reason) workaround: undefine WINDDK in sysconfig.h (=no more cdrom or harddrive support)
Damn M$... well, if I do something, I will pass sources to you...

Quote:
Originally Posted by Toni Wilen
winio.h: http://www.internals.com/ (used by Catweasel support). NOTE: winio.h is slightly broken, you need to delete some C++-only lines...
That's ok... now I'm at home and the project is in my office, I don't have a fast internet connection in my town...

Quote:
Originally Posted by Toni Wilen
blit.h etc..: build and execute gencpu, genblitter etc.. projects to generate them.
Oh, well... I'm embarassed! I opened the project manager a second after writing that post... My humble excuses...

Quote:
Originally Posted by Toni Wilen
gl/wglext.h: opengl headers, available from everywhere, just use google
I tought they were in the M$ kit! I downloaded that big ball and 5 minute after my worktime ended so i went home. Tomorrow...

Quote:
Originally Posted by Toni Wilen
Uh... I guess this breaks everything because DirectSound does not always work as documented and most sound card drivers are simply crap
Eheh... I know, driver makers sometimes do only what is needed, and sometimes, bad. Tomorrow I will do some experiments...

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...!
xtc is offline  
Old 08 July 2004, 11:08   #9
xtc
Amiga lover
 
xtc's Avatar
 
Join Date: Jun 2004
Location: Italy
Age: 46
Posts: 23
Send a message via MSN to xtc
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!
xtc is offline  
Old 08 July 2004, 11:16   #10
xtc
Amiga lover
 
xtc's Avatar
 
Join Date: Jun 2004
Location: Italy
Age: 46
Posts: 23
Send a message via MSN to xtc
For the paraport.h i've fixed it. Simply disabled parallel port emulation in sysconfig.h

But the others remain...
xtc is offline  
Old 08 July 2004, 12:10   #11
Jim
 
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 ?
 
Old 08 July 2004, 12:48   #12
xtc
Amiga lover
 
xtc's Avatar
 
Join Date: Jun 2004
Location: Italy
Age: 46
Posts: 23
Send a message via MSN to xtc
Cool

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...
xtc is offline  
Old 08 July 2004, 12:54   #13
Toni Wilen
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..
Toni Wilen is offline  
Old 08 July 2004, 15:19   #14
xtc
Amiga lover
 
xtc's Avatar
 
Join Date: Jun 2004
Location: Italy
Age: 46
Posts: 23
Send a message via MSN to xtc
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!
xtc is offline  
Old 10 July 2004, 20:16   #15
andreas
Zone Friend
 
Join Date: Jun 2001
Location: Germany
Age: 50
Posts: 5,857
Send a message via ICQ to andreas Send a message via AIM to andreas
Quote:
Originally Posted by Toni Wilen
winio.h: http://www.internals.com/ (used by Catweasel support). NOTE: winio.h is slightly broken, you need to delete some C++-only lines...
eugh...
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.
andreas is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:21.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08556 seconds with 13 queries