English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 27 May 2011, 21:48   #1
NoX1911
2064
 
NoX1911's Avatar
 
Join Date: Jul 2005
Location: de
Posts: 231
[Bug]Sound - stereo separation 0% = 100%

The Sound/'stereo separation' 0% setting is wrong. Instead of 0% (mono) its 100% (fully separated).
(Same system environment and bootlog as [Bug]WinUAE filter settings slider behavior).
NoX1911 is offline  
Old 28 May 2011, 04:17   #2
8bitbubsy
Registered User
 
8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,710
This is (I think!) because the code is not setting 0% manually to STEREO_CENTER_POS...
The reason they are not processing 0 is because of "division by zero". Seems like they just forgot to do

Code:
if (val <= 0){
    pan1 = PAN_CENTER;
    pan2 = PAN_CENTER;
    pan3 = PAN_CENTER;
    pan4 = PAN_CENTER;
}else{
    // scale calculation here
}
I guess it instead defaults to the normal Paula pan (0,255,255,0) settings, in case of 0.

Last edited by 8bitbubsy; 28 May 2011 at 04:22.
8bitbubsy is offline  
Old 28 May 2011, 09:04   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Quote:
Originally Posted by NoX1911 View Post
The Sound/'stereo separation' 0% setting is wrong.
Confirmed.

Quote:
Originally Posted by 8bitbubsy View Post
This is (I think!) because the code is not setting 0% manually to STEREO_CENTER_POS...
The reason they are not processing 0 is because of "division by zero". Seems like they just forgot to do
The most wrong guess ever.

Off by one in test that checks if stereo processing (separation+delay) can be skipped completely for performance reasons.
Toni Wilen is offline  
Old 29 May 2011, 09:40   #4
8bitbubsy
Registered User
 
8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,710
Quote:
Originally Posted by Toni Wilen View Post
The most wrong guess ever.

Off by one in test that checks if stereo processing (separation+delay) can be skipped completely for performance reasons.
This is me:

I guess you're right, I somehow thought the code did some_var/stereo_sep instead of stereo_sep*3/2. (some_var/stereo_sep would cause a division by zero if stereo_sep was 0)
Code:
audio.c:

/* If sound_stereo_separation is 0:
** sep = ((0 * 3) / 2) = 0
*/

sep = (currprefs.sound_stereo_separation = changed_prefs.sound_stereo_separation) * 3 / 2;
mixed_mul1 = MIXED_STEREO_SCALE / 2 - sep;
mixed_mul2 = MIXED_STEREO_SCALE / 2 + sep;

// sep > 0! 
mixed_on = (sep > 0 && sep < MIXED_STEREO_MAX) || mixed_stereo_size > 0;

Last edited by 8bitbubsy; 29 May 2011 at 11:51.
8bitbubsy 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
Toni: 100% stereo separation doesn't seem to work, BUG? ceztko support.WinUAE 6 16 May 2009 12:40
Stereo separation has no effect MickJT support.WinUAE 1 31 December 2007 18:57
[bug]stereo separation NoX1911 support.WinUAE 7 13 January 2007 19:50
Wide Stereo Sound xtc request.UAE Wishlist 14 10 July 2004 20:16

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 16:27.

Top

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