Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to read webaudio from tables and arrays #55

Open
EnigmaThe opened this issue Jun 12, 2022 · 0 comments
Open

Unable to read webaudio from tables and arrays #55

EnigmaThe opened this issue Jun 12, 2022 · 0 comments
Labels
bug Something isn't working Complexity: Hard Something that would be very difficult to implement. Requiring a change in the system around it.

Comments

@EnigmaThe
Copy link

Describe the bug
Unable to read webaudio from tables and arrays. Attempting to read from a table results in

To Reproduce
Steps to reproduce the behavior:

  1. Join local server
  2. Run the following in an E2

`@name webaudio test
@persist Audio:table

if(first()){
local Stream = webAudio("https://cdn.discordapp.com/attachments/270015260264497154/984533408489295872/sgc_panic_alarm.mp3")
Audio:pushWebaudio(Stream)
Stream:play()
timer("test",550)
}
if(clk("test")){
print("Table Size: "+Audio:count())
print("WA Destroyed?: " + Audio[1,webaudio]:destroy())
}
`
4. See error (WA Destroyed line will print a 0)
5. Replace 'table' in the persistent variables with 'array' and upload to E2
6. See error ("lua/entities/gmod_wire_expression2/core/custom/webaudio.lua:383: attempt to index local 'this' (a nil value)")

Expected behavior
the "Table Size" line should print a 1 to indicate that the stream has been stored in the table, and "WA Destroyed?" line should print also print a 1 to indicate that the WA has been destroyeed.

Desktop (please complete the following information):

  • OS: Windows 10
  • Gmod Branch: x86-64 - Chromium + 64-bit binaries
@EnigmaThe EnigmaThe added the bug Something isn't working label Jun 12, 2022
@Vurv78 Vurv78 added the Complexity: Hard Something that would be very difficult to implement. Requiring a change in the system around it. label Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Complexity: Hard Something that would be very difficult to implement. Requiring a change in the system around it.
Projects
None yet
Development

No branches or pull requests

2 participants