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

client:play() arguments? #2

Closed
A-Cloud-Ninja opened this issue Nov 14, 2018 · 3 comments
Closed

client:play() arguments? #2

A-Cloud-Ninja opened this issue Nov 14, 2018 · 3 comments

Comments

@A-Cloud-Ninja
Copy link

So I know you don't support this anymore really, and it seems like you're making Lumble, to be better and whatnot, but I stumbled on this and wanted to use it. I got most of it down, but your documentation for client:play seems to be wrong unfortunately. mumble.client:play(String ogg file path) is the string you document, but giving it a direct path to the .ogg doesn't work, as it expects a number for arg #2.

@A-Cloud-Ninja
Copy link
Author

A-Cloud-Ninja commented Nov 14, 2018

For example, i run the code client:play("/home/cloud/Documents/Lua/Bot/SONG.ogg",0.5) and all I get back is nil error opening file 0.5: unknown error

@A-Cloud-Ninja
Copy link
Author

So A) I figured out that your error handling in the C function responsible for play is taking the wrong argument, and B) Playback of ogg vorbis ripped via youtube-dl seems to be slowed down and pitched down via the bot somehow.

@bkacjios
Copy link
Owner

bkacjios commented Jan 19, 2019

Sorry for the late reply, I literally didn't get any notifications for this issue report.

The arguments that it checks are correct. The first argument is technically the client being passed to itself. It's how Lua handles "self"

client:play("somefile.ogg") and client.play(client, "somefile.ogg") do the same exact things.

So I'm checking for the client, then the file, then optionally volume.

The pitch issue is because I don't do any audio resampling. Make sure the audio file is at 48000Hz bitrate and it should play normally.

bkacjios added a commit that referenced this issue Dec 16, 2019
…ror message would be using the volume argument: Fixes issue #2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants