Revise cpp codes
[platform/core/api/audio-io.git] / include / CAudioInfo.h
index 81afdef..3ccc58f 100644 (file)
@@ -37,12 +37,21 @@ namespace tizen_media_audio {
         enum class EChannel : unsigned int {
             CHANNEL_MONO = 1,               /**< 1 channel, mono */
             CHANNEL_STEREO,                 /**< 2 channel, stereo */
+            CHANNEL_MULTI_3,                /**< 3 channel */
+            CHANNEL_MULTI_4,                /**< 4 channel */
+            CHANNEL_MULTI_5,                /**< 5 channel */
+            CHANNEL_MULTI_6,                /**< 6 channel */
+            CHANNEL_MULTI_7,                /**< 7 channel */
+            CHANNEL_MULTI_8,                /**< 8 channel */
             CHANNEL_MAX
         };
 
         enum class ESampleType : unsigned int {
             SAMPLE_TYPE_U8 = 1,             /**< Unsigned 8-bit audio samples */
             SAMPLE_TYPE_S16_LE,             /**< Signed 16-bit audio samples */
+            SAMPLE_TYPE_S24_LE,             /**< Signed 24-bit audio samples */
+            SAMPLE_TYPE_S24_32_LE,          /**< Signed 24-bit packed in 32-bit audio samples */
+            SAMPLE_TYPE_S32_LE,             /**< Signed 32-bit audio samples */
             SAMPLE_TYPE_MAX
         };
 
@@ -63,6 +72,8 @@ namespace tizen_media_audio {
             //AUDIO_IN_TYPE_VIDEO_CALL,
             //AUDIO_IN_TYPE_RADIO,
             AUDIO_IN_TYPE_LOOPBACK,
+            AUDIO_IN_TYPE_VOICE_RECOGNITION_SERVICE,
+            //AUDIO_IN_TYPE_MEDIA_NETWORK_SOURCE,
 
             /* Output Type */
             AUDIO_OUT_TYPE_MEDIA,
@@ -80,6 +91,8 @@ namespace tizen_media_audio {
             //AUDIO_OUT_TYPE_VIDEO_CALL,
             //AUDIO_OUT_TYPE_RADIO,
             //AUDIO_OUT_TYPE_LOOPBACK,
+            //AUDIO_OUT_TYPE_VOICE_RECOGNITION_SERVICE,
+            AUDIO_OUT_TYPE_MEDIA_NETWORK_SOURCE,
 
             AUDIO_TYPE_MAX
         };
@@ -92,25 +105,32 @@ namespace tizen_media_audio {
             AUDIO_IO_STATE_MAX
         };
 
+        enum class EAudioDirection : unsigned int {
+            AUDIO_DIRECTION_IN,       /**< Audio direction input */
+            AUDIO_DIRECTION_OUT,      /**< Audio direction output */
+            AUDIO_DIRECTION_MAX
+        };
+
         const static unsigned int MIN_SYSTEM_SAMPLERATE = 8000;
-        const static unsigned int MAX_SYSTEM_SAMPLERATE = 48000;
+        const static unsigned int MAX_SYSTEM_SAMPLERATE = 192000;
 
         /* Constructors */
         CAudioInfo();
-        CAudioInfo(unsigned int sampleRate, EChannel channel, ESampleType sampleType, EAudioType audioType, int audioIndex) throw(CAudioError);
+        CAudioInfo(unsigned int sampleRate, EChannel channel, ESampleType sampleType, EAudioType audioType, int audioIndex);
+        virtual ~CAudioInfo() = default;
 
         /* Setter & Getter */
-        unsigned int getSampleRate();
-        EChannel getChannel();
-        ESampleType getSampleType();
-        EAudioType getAudioType();
-        void setAudioType(EAudioType audioType);
-        int getAudioIndex();
-        void setAudioIndex(int audioIndex);
+        unsigned int getSampleRate() noexcept;
+        EChannel getChannel() noexcept;
+        ESampleType getSampleType() noexcept;
+        EAudioType getAudioType() noexcept;
+        void setAudioType(EAudioType audioType) noexcept;
+        int getAudioIndex() noexcept;
+        void setAudioIndex(int audioIndex) noexcept;
         void convertAudioType2StreamType(CAudioInfo::EAudioType audioType, char **streamType);
         void convertInputStreamType2AudioType(char *streamType, CAudioInfo::EAudioType *audioType);
         void convertOutputStreamType2AudioType(char *streamType, CAudioInfo::EAudioType *audioType);
-        int getSampleSize();
+        int getSampleSize() noexcept;
 
     private:
         const char *__STREAM_TYPE_TABLE[(unsigned int)EAudioType::AUDIO_TYPE_MAX] = {
@@ -130,6 +150,8 @@ namespace tizen_media_audio {
             //"call-video",           /**< AUDIO_IN_TYPE_VIDEO_CALL */
             //"radio",                /**< AUDIO_IN_TYPE_RADIO */
             "loopback-mirroring",     /**< AUDIO_IN_TYPE_LOOPBACK */
+            "voice-recognition-service",     /**< AUDIO_IN_TYPE_VOICE_RECOGNITION_SERVICE */
+            //"network-source-media", /**< AUDIO_IN_TYPE_MEDIA_NETWORK_SOURCE */
 
             /* Output Type */
             "media",                  /**< AUDIO_OUT_TYPE_MEDIA */
@@ -147,6 +169,8 @@ namespace tizen_media_audio {
             //"call-video",           /**< AUDIO_OUT_TYPE_VIDEO_CALL */
             //"radio",                /**< AUDIO_OUT_TYPE_RADIO */
             //"loopback-mirroring",   /**< AUDIO_OUT_TYPE_LOOPBACK */
+            //"voice-recognition-service",/**< AUDIO_OUT_TYPE_VOICE_RECOGNITION_SERVICE */
+            "network-source-media",   /**< AUDIO_OUT_TYPE_MEDIA_NETWORK_SOURCE */
         };
 
         unsigned int __mSampleRate;