Re: synthizer error

2020-10-04 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: synthizer error

Like every other audio library, Synthizer plays audio on background threads and doesn't wait for it to be done playing.  If it's working with time.sleep or the above while loop, it's not Synthizer's fault.If you don't understand how to integrate Synthizer with a game, I'd suggest picking up game programming resources.  it's the same as any other audio library out there.  It's up to you to attach sounds to enemies and make sure they stop when the enemy dies and things like that.  It's not Synthizer's job to wait, because that would be the same as adding time.sleep everywhere.

URL: https://forum.audiogames.net/post/577141/#p577141




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


Re: synthizer error

2020-10-04 Thread AudioGames . net Forum — Developers room : bhanuponguru via Audiogames-reflector


  


Re: synthizer error

wo thanks will try

URL: https://forum.audiogames.net/post/577090/#p577090




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


Re: synthizer error

2020-10-04 Thread AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector


  


Re: synthizer error

@11As has already been stated, the only problem is that you're not waiting for the sound to play.To wait for it, put something like:while True:
passat the end.Then, when your sound has finished, you can exit with control + c.

URL: https://forum.audiogames.net/post/577088/#p577088




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


Re: synthizer error

2020-10-04 Thread AudioGames . net Forum — Developers room : bhanuponguru via Audiogames-reflector


  


Re: synthizer error

@10as i posted example of synthizer which is provided by synthizer, i posted in @9. and in @1, i posted my code. but example scrpt works but @1 code is not working. i can't figure any mistakes. i followed the same logic as maual says. but it's not working. my question is, did i make any mistakes in that code?thankyoub

URL: https://forum.audiogames.net/post/577082/#p577082




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


Re: synthizer error

2020-10-04 Thread AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector


  


Re: synthizer error

@9The code you posted looks like the example script from the Synthizer source tree. Where are the changes? That file works by default... or did, when I updated it haha.Back to your original question: You shouldn't be using sleep to play files no. There should be some kind of main game loop running, like pyglet.app.run, or whatever pygame uses these days.Not sure if that answers your question or not though.

URL: https://forum.audiogames.net/post/577062/#p577062




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


Re: synthizer error

2020-10-03 Thread AudioGames . net Forum — Developers room : bhanuponguru via Audiogames-reflector


  


Re: synthizer error

@camlorncan you correct my code please? it's not freezing nvda. i think thread freezed. camlorn can you correct my code please? i can sleep the time ut it's not good idea when come to games for sleep for every sound. so, say if i wan't to play a music in 3d and i can't pause the scrpt. so, but the media player is working. i did exactly i think. once i will paste media player code here"""A simple media player, demonstrating the Synthizer basics."""import synthizerimport timeimport sysif len(sys.argv) != 2:    print("Usage: example.py ")    sys.exit(1)# Log to debug. At the moment this writes directly to stdout, but will in future integrate with Python's logging modules.# It's best to call this before any initialization.synthizer.configure_logging_backend(synthizer.LoggingBackend.STDERR)synthizer.set_log_level(synthizer.LogLevel.DEBUG)with synthizer.initialized():    # Get our context, which almost everything requires.    # This starts the audio threads.    ctx = synthizer.Context()    # A BufferGenerator plays back a buffer:    generator = synthizer.BufferGenerator(context=ctx)    # A buffer holds audio data. We read from the specified file:    buffer = synthizer.Buffer.from_stream(protocol="file", path=sys.argv[1])    # Tell the generator to use the buffer.    generator.buffer = buffer    # A Source3D is a 3D source, as you'd expect.    source = synthizer.Source3D(ctx)    # It'll play the BufferGenerator.    source.add_generator(generator)    playing = True    # A simple command parser.    while True:        cmd = input("Command: ")        cmd = cmd.split()        if len(cmd) == 0:            continue        if cmd[0] == "pause":                # We don't have proper pausing yet, but can simulate it                if playing:                    source.remove_generator(generator)                    playing = False        elif cmd[0] == "play":            if not playing:                source.add_generator(generator)                playing = True        elif cmd[0] == "pos":            if len(cmd) < 4:                print("Syntax: pos x y z")                continue            try:                x, y, z = [float(i) for i in cmd[1:]]            except:                print("Unable to parse coordinates")                continue            source.position = (x, y, z)        elif cmd[0] == "seek":            if len(cmd) != 2:                print("Syntax: pos ")            try:                pos = float(cmd[1])            except:                print("Unable to parse position")            generator.position = pos        elif cmd[0] == "quit":            break        else:            print("Unrecognized command")i am not saying i written exactly, but by refering to this code i written. i don't know why it's not working. i mean i can't figure out why. that's why i poted it here.

URL: https://forum.audiogames.net/post/577015/#p577015




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


Re: synthizer error

2020-10-03 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: synthizer error

Not yet. That's on the roadmap after reverb, which is on the roadmap after work stops being work and I have the mental energy to do it.  It should work with tweaking on Mac and Linux both, but someone has to sit down and do that tweaking.

URL: https://forum.audiogames.net/post/576844/#p576844




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


Re: synthizer error

2020-10-03 Thread AudioGames . net Forum — Developers room : bgt lover via Audiogames-reflector


  


Re: synthizer error

Nope, surely it's not synthiser's fault, it happens because, DK, maybe windows performed a checking for updates there, really DK, but it happens only with my comp. An exact copy of my PC runs normally, so I think I should reset windows from time to time, if I knew how anyway.btw, is there a synthiser build for linux? I want to see how it works with orca, if that freezes too. Since I've gone ubuntu fulltime, I notice the OS is by far more stable, in the sense where the system doesn't just crash randomly, and especially not just because the screen reader took a hit and perished for a while there.

URL: https://forum.audiogames.net/post/576835/#p576835




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


Re: synthizer error

2020-10-03 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: synthizer error

Not cleaning up the generator is fine in small examples.  When Synthizer is uninitialized, all handles are cleaned up for you.The missing sleep should be the problem.If there's an NVDA freeze, that's weird.  I'm not surprised that it could briefly peg the CPU, though.  It has to decode the file in its entirety to create that buffer, startup is expensive as well, and then it's immediately shut down.  But literally nothing I'm doing should be able to interfere with NVDA.

URL: https://forum.audiogames.net/post/576807/#p576807




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


Re: synthizer error

2020-10-03 Thread AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector


  


Re: synthizer error

Also, you never cleaned up your generator with generator.destroy(). Maybe put a sleep() call in there to wait for a while, before destroying stuff?HTH,

URL: https://forum.audiogames.net/post/576793/#p576793




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


Re: synthizer error

2020-10-03 Thread AudioGames . net Forum — Developers room : bgt lover via Audiogames-reflector


  


Re: synthizer error

yeah, exactly, so I don't find any error, either...just that random nvda freeze.

URL: https://forum.audiogames.net/post/576792/#p576792




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


Re: synthizer error

2020-10-03 Thread AudioGames . net Forum — Developers room : Dragonlee via Audiogames-reflector


  


Re: synthizer error

I am not familiar with synthiser at all, but it seems like code is behaving as expected. the code inside the with block, just sets up a bunch of things up, and ends right after that. So after your script is done doing the setup you specified in the with block, it will finish that, so I imagine syntheiser will just start cleaning up resources and shutting down as you can see in the logs

URL: https://forum.audiogames.net/post/576780/#p576780




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


Re: synthizer error

2020-10-03 Thread AudioGames . net Forum — Developers room : bgt lover via Audiogames-reflector


  


Re: synthizer error

I'm not the dev of synthiser, but to me, the output looks right, as you didn't manipulate the loaded sound in any way, playing it or whatever. Your code worked the same for me, except that the cpu flared to about 99% all of a suddan, and nvda crashed very horibly. That's why I'd like to try this thing on linux, but that's neither here nor there. So, if you think that the fakt that you didn't hear a sound was an error, I am almost sure it wasn't, since you didn't load the source into a player, or however is that thing called in synthiser.

URL: https://forum.audiogames.net/post/576693/#p576693




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


synthizer error

2020-10-03 Thread AudioGames . net Forum — Developers room : bhanuponguru via Audiogames-reflector


  


synthizer error

hey friends, i tryed example provided in synthizer manual it's working. then i coded some thing. it's not working. here is the code.import synthizersynthizer.configure_logging_backend(synthizer.LoggingBackend.STDERR)synthizer.set_log_level(synthizer.LogLevel.DEBUG)with synthizer.initialized():    ctx=synthizer.Context()    generator=synthizer.BufferGenerator(context=ctx)    buffer=synthizer.Buffer.from_stream(protocol="file", path="untitled.wav")    generator.buffer=buffer    source=synthizer.Source3D(ctx)    source.add_generator(generator)so, this is the code. the debugging text is as followsdebug(background-thread 1) Background thread starteddebug(context-thread 2) Thread starteddebug(unknown-thread 3) Handling path untitled.wav with handler dr_wavdebug(background-thread 1) Context shutdowndebug(context-thread 2) Context thread terminatingdebug(background-thread 1) Background thread stoppeddebug(unknown-thread 4) Deferred free processed 119 frees in a background threaddebug(unknown-thread 3) Library shutdown completeplease help me. thanks in advance

URL: https://forum.audiogames.net/post/576645/#p576645




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