Previous Thread
Next Thread
Print Thread
Page 2 of 2 1 2
Re: 0.213 arcade OSX Popeye audio bug [Re: MacBox360] #115891 09/11/19 01:38 PM
Joined: Mar 2001
Posts: 16,300
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,300
I think we shouldn't change the system locale at all and instead should find some other way to convert between strings and floats.

I have a plan in the back of my head to convert the Mac version to native Cocoa all the way (Vas's work on CoreAudio helps with a chunk of that) but that's relatively time-consuming.

Re: 0.213 arcade OSX Popeye audio bug [Re: R. Belmont] #115898 09/11/19 07:15 PM
Joined: Feb 2007
Posts: 473
C
couriersud Offline
Senior Member
Offline
Senior Member
C
Joined: Feb 2007
Posts: 473
Originally Posted by R. Belmont
I think we shouldn't change the system locale at all and instead should find some other way to convert between strings and floats..


OK, I'll leave it to Vas and you to sort this out.

Re: 0.213 arcade OSX Popeye audio bug [Re: MacBox360] #115900 09/11/19 08:03 PM
Joined: Mar 2001
Posts: 16,300
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,300
For string to float/double, atof_l() lets you specify a locale for the conversion without changing the system locale, but it might not be available on Linux. (It is on Windows, Mac, and other BSD-derived systems). Continuing research.

Re: 0.213 arcade OSX Popeye audio bug [Re: MacBox360] #115902 09/12/19 04:15 AM
Joined: Feb 2004
Posts: 2,061
Vas Crabb Online Content
Very Senior Member
Online Content
Very Senior Member
Joined: Feb 2004
Posts: 2,061
You can use a std::istream and call imbue.

Re: 0.213 arcade OSX Popeye audio bug [Re: Vas Crabb] #115912 09/13/19 10:18 AM
Joined: Feb 2007
Posts: 473
C
couriersud Offline
Senior Member
Offline
Senior Member
C
Joined: Feb 2007
Posts: 473
Originally Posted by Vas Crabb
You can use a std::istream and call imbue.


I am using this approach now in netlist. Also removing all c library stuff and moving to c++ library.

Another detail on the UI toolkit: The toolkit only changes the C library locale (setlocale). The c++ locale reports "C" on a call to locale().
So c++ functions use the "C" locale and c functions (stod and friends, printf ...) use the system locale when running on OSX.

Re: 0.213 arcade OSX Popeye audio bug [Re: couriersud] #115933 09/16/19 12:36 PM
Joined: Jan 2007
Posts: 184
M
MacBox360 Offline OP
Senior Member
OP Offline
Senior Member
M
Joined: Jan 2007
Posts: 184
Sorry for the delay, I was on holiday. Here is my locale configuration, the same I used for build latest 0.213 SDLmame:

Code
LANG="it_IT.UTF-8"
LC_COLLATE="it_IT.UTF-8"
LC_CTYPE="it_IT.UTF-8"
LC_MESSAGES="it_IT.UTF-8"
LC_MONETARY="it_IT.UTF-8"
LC_NUMERIC="it_IT.UTF-8"
LC_TIME="it_IT.UTF-8"
LC_ALL=


Re: 0.213 arcade OSX Popeye audio bug [Re: MacBox360] #115937 09/17/19 06:21 PM
Joined: Feb 2007
Posts: 473
C
couriersud Offline
Senior Member
Offline
Senior Member
C
Joined: Feb 2007
Posts: 473
The issue should be fixed now.

Re: 0.213 arcade OSX Popeye audio bug [Re: MacBox360] #115938 09/17/19 07:13 PM
Joined: Mar 2001
Posts: 16,300
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,300
Great, thanks couriersud!

Re: 0.213 arcade OSX Popeye audio bug [Re: MacBox360] #115939 09/17/19 07:54 PM
Joined: Jan 2007
Posts: 184
M
MacBox360 Offline OP
Senior Member
OP Offline
Senior Member
M
Joined: Jan 2007
Posts: 184
Just compiled the GitHub snapshot, I confirm the issue is gone. Thank you very much! :-)

Last edited by MacBox360; 09/17/19 07:54 PM.
Page 2 of 2 1 2

Moderated by  R. Belmont 

Who's Online Now
5 registered members (RColtrane, pmackinlay, R. Belmont, Pernod, 1 invisible), 89 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,683
Posts114,012
Members4,863
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3