DualSense-Windows icon indicating copy to clipboard operation
DualSense-Windows copied to clipboard

Bluetooth sound clues

Open FancyBanana opened this issue 3 years ago • 13 comments

I randomly stumbled upon an issue in ViGemBus pointing a russian post where a guy reverse engineered bluetooth audio for ds4. He successfully determined that DS4 uses standard SBC codec and actually sent an audio stream through bluetooth. I don't know how well this will word for DualSense since it has quadraphonic audio instead of simple stereo, but nevertheless it's something worth investigating in my opinion.

https://github.com/ViGEm/ViGEmBus/issues/61

If you need help understanding original post hit me up, I'm a native russian speaker.

FancyBanana avatar Nov 27 '20 12:11 FancyBanana

@FancyBanana Thank you! Looks promising maybe it will work for DS5 as well. Will get to that as soon the API is ready. I will keep this issue open as a thread for all information regarding this topic.

Ohjurot avatar Nov 27 '20 15:11 Ohjurot

There she is... At least on USB... the only thing that is a bit strange is that WASAPI sees the controller as 32-Bit device. It should be 16-Bit... Going to test simple sine wave generation now. I guess either the driver or the controller is doing the conversion, or it will just be clipped to 0x0000FFFF... EDIT: Got my 16-Bit now. Did it the wrong way. Was not asking the device for its native formate. grafik I actually thing from looking at the post you send me that BT may be easier to do than the whole WASAPI stuff... But the hardest part will be to expose it to XAudio... If it is possible without writing a driver (witch I want to avoid).

Ohjurot avatar Nov 28 '20 00:11 Ohjurot

I think there's not much you can/should do with usb audio. Since it's seen as a standard audio device I think just a function that returns a handle to the speaker and microphone device to be used by sound libraries should suffice.

FancyBanana avatar Nov 28 '20 15:11 FancyBanana

Oh, there is! I need to abstract the controller so that USB and BT work the same way. It would be nice to play multiplayer on one pc. So everybody can get its own audio no matter the connection of any controller. I am currently planning to reroute the default audio output to all controllers and add the ability the overlay a signal onto each controller independently. I also want to provide a nice way to set haptic feedback independently.

Ohjurot avatar Nov 28 '20 16:11 Ohjurot

Do you have a rough idea of what you expect the implementation to look like? If so, I can start adding wrappers in the UE4 Port ready.

KITATUS avatar Nov 30 '20 00:11 KITATUS

Werde ich dennoch über meine Heimkino- Anlage den vollen nativen Mehrkanalton hören können während das Haptik- Feature des Dualsense läuft oder geht dann nur noch der '' Lautsprecher (Wireless Controller)? In Moment ist das mit Steam leider der Fall.

Mircosfot avatar Nov 30 '20 11:11 Mircosfot

@KITATUS Normal audio won't be a big deal since I’m planning to hook into the main computer audio output and mirror it to the controllers audio. Will be as simple as a single function call (Only thing required will be access to the Core Audio API headers when building the lib). Using dedicated audio will require the presence of a wave file whose raw data gets exposed to the API. Same goes for haptics. For haptics I'm planning to add support to play generic signals (also in easy to definable patterns) to add basic functionality without audio files.

Ohjurot avatar Nov 30 '20 20:11 Ohjurot

@Mircosfot Haptik und Audio kann komplett unabhängig verwendet werden. Zur Verwendung einer oder beider Funktionalitäten wird es nicht nötig sein das Standard Ausgabegerät in Windows zu ändern. Die API wird vom Standard Ausgabegerät das Audio mithören und es an den Controller spiegeln (wenn aktiviert). Unabhängig davon kann das Haptische Feedback jedes Controllers angesteuert werden. Ob das mit dem Audio spiegeln bei Mehrkanalton funktionieren wird kann ich zum aktuellen Zeitpunkt noch nicht sagen da ich im Moment meine Anlage nicht am PC angeschlossen habe und auch noch nicht so weit bin. Sollte dies allerdings nicht funktionieren wird nur der Lautsprecher / Kopfhöreranschluss des Controllers nicht gehen das haptische Feedback beleibt dadurch unberührt.

Ohjurot avatar Nov 30 '20 20:11 Ohjurot

Ich weiß, es gehört hier nicht her aber ich mache es trotzdem: Mein DualSense ist mir gestern abgeraucht, es roch nach heißem Mainboard bei mir, dachte erst es wäre mein Rechner. Nun stellte ich fest, es war der DualSense. Der DS war den ganzen Tag lang via USB mit dem PC verbunden und nur mit dem Tool DS4Windows aktiv. Genutzt habe ich das verbaute Microfon des DS zum Voice- Chatten, das geht leider aktuell nur via USB. Der Dualsense ist wohl nicht für den Dauerbetrieb mit USB gedacht.

Mircosfot avatar Dec 09 '20 06:12 Mircosfot

@Mircosfot Ich empfehle dir Sony oder den Händler, bei dem du den Controller gekauft hast zu kontaktieren. Auch wenn der Controller hauptsächlich zum Spielen über Bluetooth gedacht ist, sollte er trotzdem einen Dauerbetrieb über USB zulassen (Maximal dürfte der Akku kaputt gehen, allerdings nur so dass er nicht angesteckt nicht lange hält… Abrauchen darf da gar nichts). Ich denke mal das irgendwas mit dem Akku oder mit der USB-Auflade-Schaltung nicht stimmt bzw. diese abgeraucht ist. Das sollte allerdings nicht passieren (vorausgesetzt Sony hat beim Dimensionieren der Schaltung keinen Fehler gemacht). Ich gehe davon aus das dein Controller irgendein Fertigung Fehler hat. Es sollte in der Regel kein Problem sein eine Rückerstattung bzw. Austausch zu bekommen. Sollte dann auch nicht mehr passieren.

Ohjurot avatar Dec 09 '20 15:12 Ohjurot

Mein neuer kommt schon morgen, Amazon.de ist da sehr kulant :D. Wem kann ich am besten diesen Fehler melden? Gibt es irgendwo ein Dev- Forum von Sony?

Mircosfot avatar Dec 09 '20 16:12 Mircosfot

@Ohjurot , wird es in Zukunft möglich sein das Gamepad am PC upzudaten? In Moment ist es leider nur mit der PS5 möglich.

Für den PC gibt es die APP '' Playstation Now''. Sony muss also auch die Option bieten dies zu ermöglichen. Bis heute wird der Dualsense nicht mit dieser APP supportet.

Mircosfot avatar Dec 10 '20 12:12 Mircosfot

@Mircosfot sorry für die späte Antwort hab deine Nachricht übersehen... Es wird sich zeigen, ob das jemand entwickelt oder Sony ein Updaten über den PC bereitstellt. Die API die ich hier entwickle wird die Funktion sehr wahrscheinlich nie bekommen. Da geht es nur darum den Controller für PC Entwickler voll nutzbar zu machen.

Ohjurot avatar Jan 02 '21 00:01 Ohjurot