# Playing sound on speaker in PS4 controller using event bank

**URL:** <https://qa.fmod.com/t/playing-sound-on-speaker-in-ps4-controller-using-event-bank/12304>\
**Category:** FMOD Studio\
**Created:** [February 11, 2016, 5:17pm UTC](https://qa.fmod.com/t/playing-sound-on-speaker-in-ps4-controller-using-event-bank/12304 "2016-02-11T17:17:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunny6121993](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@sunny6121993](https://qa.fmod.com/u/sunny6121993)\
**Post date:** [February 11, 2016, 5:17pm UTC](https://qa.fmod.com/t/playing-sound-on-speaker-in-ps4-controller-using-event-bank/12304/1 "2016-02-11T17:17:27Z")

</div>

Hello

I am now developing a PS4 game and try to output sounds from the speaker in PS4 controller. I have found an example in low level API, but since I would like to use FMOD Studio to create events for the sounds, I would like to ask if I can play the sounds by using the events I have defined in FMOD Studio instead of directly loading the audio file (just like the method used in the low level API example).

Thank you.

Regards  
Sunny Cheng

---

<div class="post-metadata">

**Author:** ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)\
**Post date:** [February 11, 2016, 11:03pm UTC](https://qa.fmod.com/t/playing-sound-on-speaker-in-ps4-controller-using-event-bank/12304/2 "2016-02-11T23:03:53Z")

</div>

If you use the functions [Bus::getChannelGroup](http://www.fmod.org/documentation/#content/generated/FMOD_Studio_Bus_GetChannelGroup.html) or [EventInstance::getChannelGroup](http://www.fmod.org/documentation/#content/generated/FMOD_Studio_EventInstance_GetChannelGroup.html) you can play events through the controller speaker using the code from the low level example.

---

<div class="post-metadata">

**Author:** ![sunny6121993](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@sunny6121993](https://qa.fmod.com/u/sunny6121993)\
**Post date:** [February 15, 2016, 3:52pm UTC](https://qa.fmod.com/t/playing-sound-on-speaker-in-ps4-controller-using-event-bank/12304/3 "2016-02-15T15:52:29Z")

</div>

> [@](#):
>
> If you use the functions [Bus::getChannelGroup](http://www.fmod.org/documentation/#content/generated/FMOD_Studio_Bus_GetChannelGroup.html) or [EventInstance::getChannelGroup](http://www.fmod.org/documentation/#content/generated/FMOD_Studio_EventInstance_GetChannelGroup.html) you can play events through the controller speaker using the code from the low level example.

I have successfully get the channel group using EventInstance::getChannelGroup, but in the code from the low level example, a FMOD::Sound pointer is also needed when calling FMOD::System::playSound() to output sound to the speaker in PS4 controller. In the sample code, it creates the FMOD::Sound object by directly loading the audio file. Are there any methods which I can create the FMOD::Sound object by using the event name defined in FMOD Studio?  
Also, I have tried to add a self-created controller channel group, which is similar to the ‘controllerPort’ object in the low level sample code, to the retrieved channel group as a child, but it does not work. Is this a proper way to output sound to the speaker in PS4 controller?  
If possible, may I have some sample code for this issue other than the low level example?  
Thank you.

---

<div class="post-metadata">

**Author:** ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)\
**Post date:** [February 15, 2016, 10:52pm UTC](https://qa.fmod.com/t/playing-sound-on-speaker-in-ps4-controller-using-event-bank/12304/4 "2016-02-15T22:52:42Z")

</div>

You’re overthinking things. Just take the channel group from the event or bus and call attachChannelGroupToPort() with it. That is all.

---

<div class="post-metadata">

**Author:** ![sunny6121993](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@sunny6121993](https://qa.fmod.com/u/sunny6121993)\
**Post date:** [February 16, 2016, 11:28am UTC](https://qa.fmod.com/t/playing-sound-on-speaker-in-ps4-controller-using-event-bank/12304/5 "2016-02-16T11:28:06Z")

</div>

Thanks Nicholas. It works when I attach the channel group retrieved from the event instance to controller port through low level system.
