Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: The program for playing audio files by the key

I can't really tell about libaudioverse, it worked on small games I made to test it, but on something bigger...I wouldn't be surprised though, its node system must be quite expensive to computation. From my tests, Bass is library with the best performance, even Fmod is quite laggy compared to it.The good thing about serializing dictionaries is, that their data structure is always the same. Thus you don't need to worry about breaking things, even in long term and with binary serializers, like pickle. Using it on whole classes should be considered carefully, but on dictionaries, it should work just fine.@16: I don't know about that, but there are:https://docs.microsoft.com/en-us/dotnet … mework-4.8andhttps://docs.microsoft.com/en-us/dotnet … mework-4.8The problem with ini files is, that they don't support nested structures, just basic settings. So you would be able to either serialize just simple homogeous dictionaries, for example composed of strings, or you'd need a serialize method for special objects, which would turn them into a deserializable string, which you could save into the ini file.Both can be achieved easily using LINQ, you don't need a serializer to do that.Best regardsRastislav

URL: https://forum.audiogames.net/post/494400/#p494400




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Nuno via Audiogames-reflector


  


Re: The program for playing audio files by the key

BTW I wonder if there's a way to convert C# dict to an INI file

URL: https://forum.audiogames.net/post/494384/#p494384




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: The program for playing audio files by the key

@14, whatever it does is right but inefficient. FMOD and BASS do that a lot better IMO.As for serialization with PICKLE, I wouldn't do that if you want to be able to keep the code the same for the long term. Pickle is well known for breaking backwards compatibility when it likes.

URL: https://forum.audiogames.net/post/494376/#p494376




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: The program for playing audio files by the key

Thats probably why it starts lagging as soon as you try to process several sounds at once.

URL: https://forum.audiogames.net/post/494375/#p494375




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: The program for playing audio files by the key

Libaudioverse is also a ridiculous CPU hog (or at least it was when I was using it in a game).

URL: https://forum.audiogames.net/post/494373/#p494373




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: The program for playing audio files by the key

Libaudioverse is, at least when I tried it out last, very inperformant and can get laggy and mess things up as soon as you play more than one sound at a time, even on higher end machines. It is also rather large in size (something larger than 1 MB, compared to BASS which is like 100 KB in size). But since you don't want to output too many things at once and don't need the HRTF capabilities of libaudioverse, it should still work for your purpose. Just go with the library you like best and feel comfortable with.

URL: https://forum.audiogames.net/post/494351/#p494351




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: The program for playing audio files by the key

@1: regarding sound I can send you my wrapper for libaudioverse, which turns its node based system into bgt style Sound object, so you can use basically the same methods as you would in BGT, like play, play_wait, play_looped, stop, etc. on Sound objects.It's asynchronous, it has support for selection of sound devices (although I have no idea, if you can list them as well) and it can play multiple sounds at once, though I didn't try if to multiple outputs at once as well.Of course it isn't really important which library you choose, i think most of the famous do equally well. You can go for bass in C#, there is a complete and nicely documented wrapper there.As for saving to ini files, why to bother with it? Just collect your keys in a dictionary, and then serialize it using pickle, or any other serialization library, if you want the output in yaml, json or xml.The same goes for C#, which has native xml as well as binary serializers.As for gui, I still like WxPython more than PyQt, but for such simple app, I think it doesn't really matter. Go with whichever syntax and tutorials you like more. Again, the same goes for C#, Winforms and WPF will both give you infact equal functionality, when it's primarily about catching keys.And like others pointed out already, you don't need to bother with multithreading either, your audio library should do it for you. And if you ever needed it for some reason, Python has built-in modules which... let say allow you to run two things at once, that should be enough. Until you keep your eye on ownership of individual threads and make sure that they have what they work with just for themselves, there is really nothing to worry about. Real problems appear, when two or more threads need to access the same memory, but you shouldn't really need that in this project.Best regardsRastislav

URL: https://forum.audiogames.net/post/494303/#p494303




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: The program for playing audio files by the key

@9, actually the termonology is correct. At the system level, there are two types of "tasks" that an operating system has: if the OS does not implement multithreading/concurrency, you have just "processes". If, on the other hand, you have multithreading/concurrency, you have "threads". A procss is pretty much a "thread". There's not much of a difference. The only major one is that a "thread" is usually started within a process, whereas a "process" is usually started from code stored in external storage. However, its trivial for the kernel to launch a process that does not follow this philosophy.

URL: https://forum.audiogames.net/post/494294/#p494294




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: The program for playing audio files by the key

@9, actually the termonology is correct. At the system level, there are two typeso f "tasks" that an operating system has: (1) if the OS does not implement multithreading/concurrency, you have just "processes". If, on the other hand, you have multithreading/concurrency, you have "threads". A procss is pretty much a "thread". There's not much of a difference. The only major one is that a "thread" is usually started within a process, whereas a "process" is usually started from code stored in external storage. However, its trivial for the kernel to launch a process that does not follow this philosophy.

URL: https://forum.audiogames.net/post/494294/#p494294




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: The program for playing audio files by the key

Well, the only problem with it is calling it threading, actually. Its nice to have blocking operations run simultaneously, although its technically just one thread, but it allows a bit flexibility if operations tike quite a long time before completing and you don't want to waste the time idling around. But thats already it.

URL: https://forum.audiogames.net/post/494286/#p494286




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: The program for playing audio files by the key

@7, ah, I didn't know that. And yes, QT does support native threading (I've used it before in C++, its actually pretty badass) but entirely unnecessary. If youneed it, you should probably read a book on it or get someone to teach you it. Improperly threading an application canbe disastrous. And Python's threading is... just... yeah. Gross. (Understatement of the month, I think...)

URL: https://forum.audiogames.net/post/494277/#p494277




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: The program for playing audio files by the key

BASS supports it for sure, even to multiple devices at the same time. I however don't know if sound_lib does. Bass4Py does though.Threading in Python is... yeah, not impossible, but yeah. Since Asyncio exists now for Python 3, it got a bit better, but well... as Ethin said, threading is rather complicated and you should keep your hands away from it. Although Qt, should you decide to stick with it, supports native threading and also supports all required lock/mutex mechanisms to secure thread-safety, even in Python, and thats even pretty easy to achieve. Its however unnecessary when building such an easy application like yours.

URL: https://forum.audiogames.net/post/494275/#p494275




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: The program for playing audio files by the key

Do not use threading for this. Just... no. Not sure where you thought that was a good idea, but it will be a waste of CPU cycles, CPU time and system resources. Audio playback (inn any good audio library and in any good OS-level audio subsystem) is asynchronous. As such, creating a thread here would be pointless. Furthermore, introducing threading to something like this will require you to *actually* learn how multithreading works and how to use it properly. That is difficult to grasp properly in a language like Python where semaphores, mutexes andsuch don't exist. Plus, multithreading is difficult either way; even expert programmers get it wrong. No one willget itright the first time, and it brings a ton of complexity and extra debugging time to the table. If you really do need it, use it, but I'd either use Cython or not use Python at all.I significantly doubt BASS supports playback to multiple devices. I know FMOD does (though you'll wantdifferent systems for each device).

URL: https://forum.audiogames.net/post/494269/#p494269




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: The program for playing audio files by the key

Do not use threading for this. Just... no. Not sure where you thought that was a good idea, but it will be a waste of CPU cycles, CPU time and system resources. Audio playback (inn any good audio library and in any good OS-level audio subsystem) is asynchronous. As such, creating a thread here would be pointless.I significantly doubt BASS supports playback to multiple devices. I know FMOD does (though you'll wantdifferent systems for each devie).

URL: https://forum.audiogames.net/post/494269/#p494269




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: The program for playing audio files by the key

Its fine in most cases. It even supports additional attributes like accessible name and accessible descriptions, which will be recognized by screen readers to give additional information about controls and stuff. Qt has the ability to even set up nice-looking GUIs without you needing to give any information about the actual size and position. All you need to decide upon is the layout you want to have (vertical or horizontal, grid-based etc) and it will place the controls for you. It won't look stylish and modern and cool, but it will be accessible for sighted people as well and won't look totally messed up.

URL: https://forum.audiogames.net/post/494258/#p494258




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: The program for playing audio files by the key

Its fine in most cases. It even supports additional attributes like accessible name and accessible descriptions, which will be recognized by screen readers to give additional information about controls and stuff. Qt has the ability to even set up nice-looking GUIs without you needing to give any information about the actual size and position. All you need to decide upon is the layout you want to have (vertical or horizontal, grid-based etc) and it will place the controls for you. It won't like stylish and modern and cool, but it will be accessible for sighted people as well and won't look totally messed up.

URL: https://forum.audiogames.net/post/494258/#p494258




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Nuno via Audiogames-reflector


  


Re: The program for playing audio files by the key

Hijacker, how's PyQT if it comes to accessibility?

URL: https://forum.audiogames.net/post/494252/#p494252




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: The program for playing audio files by the key

Python should be just fine here. I'd however recommend using PyQt5 instead of wxPython, there are several in-depth tutorials out there and wxPython still got its problems at the time. If it comes to playing stuff to multiple devices, BASS should be your easiest option. Most people tend to use sound_lib here, although that one is rather outdated, but it seems to work. I don't know if sound_lib supports output to multiple devices however. You can also take a look into Bass4Py, but this one doesn't yet have a good documentation (its still in the works and currently being developed all new from scatch).Configuring via ini file... hm, Python supports multiple configuration possibilities, like ini files, json, pickling, whatever is best for your use case and with what you feel comfortable with.

URL: https://forum.audiogames.net/post/494248/#p494248




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: The program for playing audio files by the key

2020-01-20 Thread AudioGames . net Forum — Developers room : Nuno via Audiogames-reflector


  


Re: The program for playing audio files by the key

Lol, lol lol ol!Hm, hehe, umm in Python you can use WX Python, and in C#, hm I guess winforms would be sufficient, or maybe not? Maybe WPF, UWP, hm? Avalonia! Oh! That one's not accessible.I recommend using C++, or Pure Basic, or Electron, possibilities are endless.

URL: https://forum.audiogames.net/post/494228/#p494228




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


The program for playing audio files by the key

2020-01-19 Thread AudioGames . net Forum — Developers room : jonikster via Audiogames-reflector


  


The program for playing audio files by the key

Hello.My friend asked me to develop an application for his work. I decided that this is a very good idea, because I can use this as a portfolio.The tasks of the program are very simple.There is a main window. In this window I can get into the program settings through the menu. There I can choose a playback device.Further, in the program, I can press CTRL + any key. The audio file selection dialog opens. There, I should select an audio file.Further, when I press this key without CTRL, this file will be played on the device that is selected in the settings.I plan to do this through an ini file. It is correct?In addition, I would like to create a double thread. Output to the device selected in the program settings, and output to the playback device by default.I would like to create this in Python.What libraries should I use?And in any case, which libraries should I use with C#?Thanks in advance!

URL: https://forum.audiogames.net/post/494223/#p494223




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector