Core Audio Plugin

Questions and comments specific to a particular plugin should go here.
User avatar
kgschlosser
Site Admin
Posts: 5504
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Core Audio Plugin

Post by kgschlosser » Sun Sep 15, 2019 9:25 am

well change the language you have set in EG to English :shock:

I'm playing. I will fix it.
If you like the work I have been doing then feel free to Image

z3us
Posts: 42
Joined: Fri Jul 29, 2011 2:35 am

Re: Core Audio Plugin

Post by z3us » Wed Sep 18, 2019 9:57 pm

I´m afraid it still doesn´t work
Error starting plugin: Core Audio
Traceback (most recent call last) (0.5.0-rc6):
File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 196, in Start
self.instance.__start__(*self.args)
File "C:\ProgramData\EventGhost\plugins\CoreAudio3\__init__.py", line 759, in __start__
self.callbacks = Callbacks(self)
File "C:\ProgramData\EventGhost\plugins\CoreAudio3\__init__.py", line 265, in __init__
self.__map_device(device)
File "C:\ProgramData\EventGhost\plugins\CoreAudio3\__init__.py", line 282, in __map_device
endpoint.data_flow
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 4: ordinal not in range(128)

User avatar
kgschlosser
Site Admin
Posts: 5504
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Core Audio Plugin

Post by kgschlosser » Thu Sep 19, 2019 4:12 am

I didn't say that I had fixed it. I said I will fix it.. I have not gotten to it yet. I did come across another bug so I am going to fix that one at the same time.
If you like the work I have been doing then feel free to Image

z3us
Posts: 42
Joined: Fri Jul 29, 2011 2:35 am

Re: Core Audio Plugin

Post by z3us » Thu Sep 19, 2019 7:32 pm

kgschlosser wrote:
Thu Sep 19, 2019 4:12 am
I didn't say that I had fixed it. I said I will fix it.. I have not gotten to it yet. I did come across another bug so I am going to fix that one at the same time.
Sorry. I thought u said that changing the language of EG would fix it

User avatar
kgschlosser
Site Admin
Posts: 5504
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Core Audio Plugin

Post by kgschlosser » Fri Sep 20, 2019 6:08 am

you need to change the local to US. which would be setting your Windows language and region to United States... This is something I overlooked when I made the plugin I had forgotten that I am dealing with information from Windows and it can return unicode data. unicode data is striong data outside the 32-127 decimal value for each byte (letter) ascii codes essentially. when dealing with other languages that have characters that do not fall into that range unicode is used to handle that extended information. where in the English language all human readable characters fall between 32 and 127 decimal value. and unicode allocates additional bytes to extend the character set.

better explanation is this..

a number from 0 to 255 when stored on a computer takes up 1 byte in size or 8 bits... so there is a mapping of letters to a number value. so one letter in the English language will also take up one byte of data...
the letter A when stored is the number 65 (hex 0x41)
and the letter ń with acute is the number 324 (hex 0x144) which is outside of the ascii range and is also a larger numeric value then one byte can hold. so 2 bytes need to be allocated for this data. so when you store a string or a bunch of letter together when the string is viewed as non unicode each letter is a single byte of data. and when manipulating the string at all it is done a single byte at a time. when dealing with unicode that has multiple bytes for a single character i cannot use the normal container for a string because it is not designed to know how many bytes to return for a unicode character.

It's a real pain in the ass actually.... I am going to screw round with it now..
If you like the work I have been doing then feel free to Image

z3us
Posts: 42
Joined: Fri Jul 29, 2011 2:35 am

Re: Core Audio Plugin

Post by z3us » Fri Sep 20, 2019 11:51 am

Thank you for your work

User avatar
kgschlosser
Site Admin
Posts: 5504
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Core Audio Plugin

Post by kgschlosser » Wed Oct 23, 2019 6:44 pm

OK I have been dinking around with the unicode problem. I have to do a little more bug testing but I should have it finished up in the next few days. I had quite a bit to modify. I didn't realize how much information I obtained from Windows could be unicode encoded.
If you like the work I have been doing then feel free to Image

dan Edens
Experienced User
Posts: 110
Joined: Mon Sep 24, 2018 7:57 pm

Re: Core Audio Plugin

Post by dan Edens » Wed Nov 06, 2019 1:16 pm

omg and just like that the long war with "device attached" is over lol.
I finally have a reliable way to tell if my computer is docked, in the field, or at home.
yuuuussssssss
+1 Internets

dan Edens
Experienced User
Posts: 110
Joined: Mon Sep 24, 2018 7:57 pm

Re: Core Audio Plugin

Post by dan Edens » Wed Nov 06, 2019 1:17 pm

It can even tell which port my headset is plugged into... bruh
thhhaaannnkkkkk yyooouuuuuuuuuuu

dan Edens
Experienced User
Posts: 110
Joined: Mon Sep 24, 2018 7:57 pm

Re: Core Audio Plugin

Post by dan Edens » Wed Nov 06, 2019 1:34 pm

Was getting constant errors with "new_volume" not being set. Added this at line 468 in %PROGRAMDATA%\EventGhost\plugins\CoreAudio\__init__.py and it made it stop. If my volume randomly freaks out I'll update. lol

Code: Select all

       
        try:
            new_volume
        except AttributeError:
            new_volume = old_vol + 1
        except UnboundLocalError:
            new_volume = old_vol + 1
            
            

User avatar
kgschlosser
Site Admin
Posts: 5504
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Core Audio Plugin

Post by kgschlosser » Wed Nov 06, 2019 3:26 pm

Yeah I saw that issue I just never got a chance to fix it. I am still screwing about with the unicode issues as well. Working in windows when it's set to a different language is a pain in the ass. so it's hard to bug fix the unicode issue.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 5504
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Core Audio Plugin

Post by kgschlosser » Wed Nov 06, 2019 3:41 pm

the correct fix is this actually

Code: Select all

        if new_vol is not None and old_vol is not None and new_vol > old_vol:
            vol_diff = new_vol - old_vol
        else:
            vol_diff = old_vol
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 5504
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Core Audio Plugin

Post by kgschlosser » Wed Nov 06, 2019 3:48 pm

scratch the last comment. there is a larger underlying problem. I am going to release a new version shortly that will have that error and hopefully the unicode problems solved.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 5504
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Core Audio Plugin

Post by kgschlosser » Thu Nov 07, 2019 5:58 am

come and get it.. a new version is available.. see the first post in this thread..
If you like the work I have been doing then feel free to Image

z3us
Posts: 42
Joined: Fri Jul 29, 2011 2:35 am

Re: Core Audio Plugin

Post by z3us » Sat Nov 09, 2019 12:30 pm

kgschlosser wrote:
Thu Nov 07, 2019 5:58 am
come and get it.. a new version is available.. see the first post in this thread..

Code: Select all

   Error starting plugin: Core Audio
   Traceback (most recent call last) (0.5.0-rc6):
     File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 196, in Start
       self.instance.__start__(*self.args)
     File "C:\ProgramData\EventGhost\plugins\CoreAudio3\__init__.py", line 876, in __start__
       self.callbacks = Callbacks(self)
     File "C:\ProgramData\EventGhost\plugins\CoreAudio3\__init__.py", line 271, in __init__
       self.__map_device(device)
     File "C:\ProgramData\EventGhost\plugins\CoreAudio3\__init__.py", line 290, in __map_device
       _format_endpoint_name(endpoint),
     File "C:\ProgramData\EventGhost\plugins\CoreAudio3\__init__.py", line 161, in _format_endpoint_name
       name = endpoint.name.decode('utf-8')
     File "encodings\utf_8.pyc", line 16, in decode
   UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 10: ordinal not in range(128)
CoreAudio.Realtek High Definition Audio.Altavoces (Realtek High Definition Audio).Default.Render <eg.UserPluginModule.CoreAudio3.pyWinCoreAudio.endpoint.AudioEndpoint object at 0x0B91F2F0>

Post Reply