tynet-lichat/stevenchan - IRC Chatlog
Search
15:19:18
suntmc
so if i set the volume (going from 0 - 127) using set_volume, it'll set it locally. it overrides whatever volume the phone was set to
15:20:06
suntmc
if i set it to roughly 50%, the phone is still on whatever it was set before. but then the max volume is 50%. When i turn up my phone, 100% there will still be 50%, since it's limited locally on the ESP
15:20:48
suntmc
i've checked Espressif's docs and they support basically all AVCR commands. there's one that's 'volume up'. all i need to do is make that button send this command to the phone
15:21:33
suntmc
the frustrating part is, that guy implemented public methods like virtual void pause(); that do this, except with another command of course
15:22:24
suntmc
pause() is public and the other method is protected. i guess it's easiest to just write a public method into the source code
15:22:41
shinmera
All you need to do for that is to create a subclass of BluetoothA2DPSink, add a new public method that invokes that function, and then call your new public method from your main thing.
15:24:10
suntmc
https://github.com/pschatzmann/ESP32-A2DP/blob/33dbcc80bd3f95c6b23e3219c82e56442c89422f/src/BluetoothA2DPSink.cpp#:~:text=void%20BluetoothA2DPSink%3A%3A-,play,-()%7B
15:24:10
Colleen
github.com/pschatzmann/ESP3... Website (HTML), Title: ESP32-A2DP/BluetoothA2DPSink.cpp at 33dbcc80bd3f95c6b23e3219c82e56442c89422f · pschatzmann/ESP32-A2DP
15:24:10
Colleen
github.com/pschatzmann/ESP3... Website (HTML), Title: ESP32-A2DP/BluetoothA2DPSink.cpp at 33dbcc80bd3f95c6b23e3219c82e56442c89422f · pschatzmann/ESP32-A2DP
15:24:35
suntmc
if you check here in the .cpp file, couldn't i just copy the play function, rename it and make a vol_up one?
15:25:02
shinmera
Sure you could. But it would require changing the original source code. You can do what you want without having to do that.
15:25:58
suntmc
ok so creating a new class would be a way to solve the problem without me having to rewrite the original source?
15:27:25
shinmera
class MySink : public BluetoothA2DPSink { public: virtual void dec_volume(); virtual void inc_volume(); } void MySink::dec_volume(){ execute_avrc_command(ESP_AVRC_PT_CMD_whatever); } .. same for inc_volume
15:44:56
suntmc
welp. next problem. but that's maybe an API problem. it doesn't increase the volume, sadly
16:40:16
suntmc
seems windows sends in 48000Hz instead of 44100, like it says in the sound settings. weird
16:45:40
suntmc
i just set the arduino to a specific frequency instead of letting it decide because apparently the BT controller in windows reports something else to the device than what it actually sends?
16:48:18
shinmera
Also Windows drivers will Not do any resampling for you, so if you don't provide exactly what the device wants it's just Fuck You
18:32:34
suntmc
so turns out, updating to the ESP-IDF that contains the whole apis and shit also enabled absolute volume control, which the iphone supports. but whatever bullshit i tired to code does not work. but now the 'set_volume' command just works without issues. i never tried it again after updating to the latest IDF
18:53:41
shinmera
Gingy and I regularly have days where we spend all our time on something completely trivial.
18:56:59
gingerale
I finally cooked a meal I meant to make my dinner yesterday. Creamy salmon soup with root vegetables and fennel.
18:57:31
gingerale
A bit too much butter and lemon juice but I didn't want to leave half a lemon in the fridge.
19:38:19
suntmc
everything's working now. even tried a speaker. no idea if the video i took of it is ever gonna finish uploading
20:21:45
shinmera
https://chat.tymoon.eu/data//stevenchan/aa05b41ab1321e8a37f6c4d57733c32431f3210cf3eab50e1719e7cda3fd3cde.png
20:57:26
suntmc
was confused by the sidebar and the error message of this channel not existing. but i was already joined
20:59:53
suntmc
shinmera: https://imgur.com/a/IMzeIVb 'final' result. pretty happy how it works so far
21:04:04
Colleen
www.youtube.com/watch?v=zN-... Website (HTML), Title: [Vinesauce] Vinny - Awful Pizza Review - YouTube
21:04:04
Colleen
www.youtube.com/watch?v=zN-... Website (HTML), Title: [Vinesauce] Vinny - Awful Pizza Review - YouTube
23:17:11
suntmc
when i click on the big grey circle in the top left corner, the channel sidebar appears
23:19:58
suntmc
and it seems that uploading a video does nothing. it just tells me that it's uploading. but then nothing happens
23:23:37
suntmc
the only thing i really want is being able to paste images. only reason why i used the web client. hexchat is fine otherwise