Esempio n. 1
0
    //from this method for changeTrackAPI.
    public override NexPlayerAudioStream GetCurrentAudioStream()
    {
        NexPlayerAudioStream currentAudioStream = new NexPlayerAudioStream();

        int    id         = NEXPLAYERUnity_GetCurrentAudioStreamID();
        string name       = NEXPLAYERUnity_GetCurrentAudioStreamName();
        string language   = NEXPLAYERUnity_GetCurrentAudioStreamLanguage();
        int    wholeCount = NEXPLAYERUnity_GetAudioStreamCount();

        Log("GetCurrentAudioStream id c# : " + id);
        Log("GetCurrentAudioStream name c# : " + name);
        Log("GetCurrentAudioStream language c# : " + language);
        Log("GetCurrentAudioStream count c# : " + wholeCount);

        currentAudioStream.id       = id;
        currentAudioStream.name     = name;
        currentAudioStream.language = language;


        return(currentAudioStream);
    }
Esempio n. 2
0
    public override NexPlayerAudioStream[] GetAudioStreams()
    {
        int count = NEXPLAYERUnity_GetAudioStreamCount();

        Log(" NexPlayerAudioStream count : " + count);

        NexPlayerAudioStream[] audioStreams = null;

        if (count > 0)
        {
            audioStreams = new NexPlayerAudioStream[count];
            Log("NexPlayerAudioStream audioStreams : " + audioStreams.Length);

            for (int i = 0; i < audioStreams.Length; i++)
            {
                Log("NexPlayerAudioStream call to index count : " + i);
                audioStreams[i].id       = NEXPLAYERUnity_GetAudioStreamID(i);
                audioStreams[i].name     = NEXPLAYERUnity_GetAudioStreamName(i);
                audioStreams[i].language = NEXPLAYERUnity_GetAudioStreamLanguage(i);
            }
        }
        return(audioStreams);
    }
Esempio n. 3
0
    public override void SetAudioStream(NexPlayerAudioStream audioStream)
    {
        int id = audioStream.id;

        NEXPLAYERUnity_SetAudioStream(id);
    }
 /// <summary>
 /// Set a stream to be used. The possible audio streams can be obtained from the method GetAudioStreams. This method is not available for all the platforms
 /// </summary>
 public virtual void SetAudioStream(NexPlayerAudioStream audioStream)
 {
     Debug.Log("Unsupported platform");
 }