CTR Pia
4.11.3
Game Communication Engine
|
This sample demo implements conferencing among multiple users using VoiceProtocol
from PiaChat
.
The following Pia features are used in this sample demo.
nn::pia::chat::VoiceProtocol
nn::pia::inet::NexFacade
nn::pia::session::Session
nn::pia::transport::Transport
Input | Operation |
---|---|
Up/down on the +Control Pad | Moves the cursor up and down. |
Right/left on the +Control Pad | Changes the value of the setting currently selected with the cursor. |
A Button | Transitions to the states selected on the console. |
The following Network Start Menu screen appears when the sample is started.
Figure 1. Network Start Screen
----------------------------------------
<<<< Network Start Menu >>>>
----------------------------------------
> Network Match Mode : ANYBODY
Game Mode : xxxxxx
Max Station Num : 8
Start Network...
The following table provides a description of each menu item.
Table 1. Content of the Network Start Menu
Menu | Description |
---|---|
Network Match Mode | Specifies the ANYBODY and FRIEND options in matchmaking mode. (Note: Specifying FRIEND does not work currently.) |
Game Mode | Specifies the game mode. |
Max Station Num | Specifies the maximum number of devices joined during sessions. |
Start Network... | Starts the network connection. |
Selecting Start Network connects to the access point and logs in to the game server. Make sure the access point being connected to is already registered under system settings. To change a parameter such as the matchmaking mode, use the UP ARROW and DOWN ARROW keys to align the cursor with the setting you want to change and use the LEFT ARROW and RIGHT ARROW keys to change the setting. To establish a session, the matchmaking mode, game mode, and maximum number of devices must all match. Make sure the parameters on each device being connected are all the same.
After you successfully connect to the access point and log in to the game server, a network information screen and a screen for selecting the conference mode (shown below) appear.
Figure 2. Network Information/Game Menu Selection Screen
----------------------------------------------------
<<<< Network Information... >>>>
----------------------------------------------------
HOST : xxx.xxx.xxx.xxx
MASK : xxx.xxx.xxx.xxx
DNS1 : xxx.xxx.xxx.xxx
DNS2 : xxx.xxx.xxx.xxx
GATEWAY : xxx.xxx.xxx.xxx
MY StationId : xxxxxxxxxxxxxxxx
MY PID : xxxxxxxxx
HOST PID : xxxxxxxxx
----------------------------------------------------
----------------------------------------
<<<< Network Connected >>>>
----------------------------------------
> Conference Mode Menu...
Stop Network...
The following table describes the content of the Network Information screen.
Table 2. Content of the Network Information Screen
Menu | Description |
---|---|
HOST | IP address of the local host. |
MASK | Netmask. |
DNS1 | IP address of the primary DNS. |
DNS2 | IP address of the secondary DNS. |
GATEWAY | IP address of the default gateway. |
MY StationId | StationId of the local station. |
MY PID | PID of the local device. |
HOST PID | PID of the session host. |
Rest the cursor on the Conference Mode Menu and press the A Button to go to the Conference working state.
Conferencing is possible in this state. The system can transition to the screen for setting conferencing parameters while the conference is in progress. The following screen appears in the conference working state.
Figure 3. Conference Mode Working Screen
----------------------------------------------------
<<<< Audio Information... >>>>
----------------------------------------------------
StationId : 0x----------------
Sequence : ---
Internal Latency : ---
Buffer Latency : ---
Jiitter : ---
Clock Skew : ---
Buffer Count : ---
Drop Count : ---
Continuous Drop : ---
Jam Count : ---
Duplicate Count : ---
Wait Count : ---
Late Count : ---
Recent Late Count : ---
Recent Receive Count : ---
Recent Late Ratio : ---
Recover Count : ---
Recover Using Spare Count : ---
VAD Value : ---
VAD Power : ---
----------------------------------------------------
----------------------------------------
<<<< Conference working. >>>>
----------------------------------------
MY StationId(0x----------------)
Press Y => BGM On/Off
> Member[ID:0x----] PARTICIPATE/LEAVE
Member[ID:0x----] PARTICIPATE/LEAVE
Member[ID:0x----] PARTICIPATE/LEAVE
Member[ID:0x----] PARTICIPATE/LEAVE
Member[ID:0x----] PARTICIPATE/LEAVE
Member[ID:0x----] PARTICIPATE/LEAVE
Member[ID:0x----] PARTICIPATE/LEAVE
Member[ID:0x----] PARTICIPATE/LEAVE
Change Setting...
Stop Conference...
Press Y at this point to turn on or turn off the background music. In this state, you can add and remove any station from the conference. Matched stations are those for which a value other than 0x00fd is displayed as the ID value. You can switch between LEAVE/PARTICIPATE for any of these stations by placing the cursor on one and pressing the A Button. To have a discussion in conference mode, both stations must be in PARTICIPATE mode. This operation must be repeated for every client participating in the conference. After a client has been added to the conference, it can chat without any special operations.
The following table describes the audio streaming information displayed on the screen.
Table 3. Content of the Audio Streaming Information Screen
Menu | Description |
---|---|
StationId | Specifies the StationId of the displayed audio information. |
Sequence | Specifies the packet sequence number. |
Internal Latency | Specifies the internal receive latency amount. |
Buffer Latency | Specifies the latency of the jitter buffer. |
Jitter | Specifies the maximum latency of the jitter buffer. |
Clock Skew | Specifies the clock skew monitor value. |
Buffer Count | Specifies the number of samples stored in the audio buffer. |
Drop Count | Specifies the number of dropped packets. |
Continuous Drop | Specifies the number of consecutively dropped packets. |
Jam Count | Specifies the number of times packets did not arrive in order. |
Duplicate Count | Specifies the number of duplicate packet sequence numbers. |
Wait Count | Specifies the number of times packet playback was put on hold and drop recovery attempted. |
Late Count | Specifies the number of packets that could not be played back because of delays. |
Recent Late Count | Specifies the number of most recent packets that could not be played back because of delays. |
Recent Receive Count | Specifies the total number of the most recent packets. |
Recent Late Ratio | Specifies the ratio of most recent packets that could not be played back because of delays. |
Recover Count | Specifies the number of times the drop recovery feature recovered dropped packets, without using spare packets. |
Recover Using Spare Count | Specifies the number of times dropped packets were recovered using spare packets. |
VAD Value | Specifies the result determined by VAD for the presence or absence of audio. |
VAD Power | Average power of the audio data in the current audio frame. |
Use the L/R Buttons on the Audio Streaming Information screen to change the peer for which information is being shown. Rest the cursor on Change Setting and press the A Button to show the screen for changing the conference settings. The current settings are shown here. These settings can be changed while conferencing is running.
Figure 4. Edit Conference Settings Screen
----------------------------------------
<<<< Change Conference Setting >>>>
----------------------------------------
Press Y => BGM On/Off
> Codec : 4-bit ADPCM
Active Gain : 350
Inactive Gain : 280
Clamp Gain : 49
Release Time : 5
Mic Gain :
Speaker Volume : 10
BGM Volume :
Noise Skip Time : 0
Return...
Conference mode information and config screen content are as follows.
Table 4. Conference Mode Information and Configuration Screen Content
Menu | Description |
---|---|
Codec | Specifies the main packet codec. |
Active Gain | Specifies the active speech frame detection threshold. |
Inactive Gain | Specifies the silent frame detection threshold. |
Clamp Gain | Specifies the threshold for unconditionally detecting silence (volume scale). |
Release Time | Specifies how long to wait to stop sending packets after detecting silence. |
Mic Gain | The mic gain. |
Speaker Volume | The speaker volume. |
BGM Volume | The volume of the background music. |
Noise Skip Time | Specifies the length of time audio is not sent due to SignalNoiseSkip. |
To exit the conference settings screen, select Return, and then press the A Button.