Java Code Examples for com.google.android.exoplayer2.C#STREAM_TYPE_RING
The following examples show how to use
com.google.android.exoplayer2.C#STREAM_TYPE_RING .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Util.java From MediaSDK with Apache License 2.0 | 6 votes |
/** * Returns the {@link C.AudioUsage} corresponding to the specified {@link C.StreamType}. */ @C.AudioUsage public static int getAudioUsageForStreamType(@C.StreamType int streamType) { switch (streamType) { case C.STREAM_TYPE_ALARM: return C.USAGE_ALARM; case C.STREAM_TYPE_DTMF: return C.USAGE_VOICE_COMMUNICATION_SIGNALLING; case C.STREAM_TYPE_NOTIFICATION: return C.USAGE_NOTIFICATION; case C.STREAM_TYPE_RING: return C.USAGE_NOTIFICATION_RINGTONE; case C.STREAM_TYPE_SYSTEM: return C.USAGE_ASSISTANCE_SONIFICATION; case C.STREAM_TYPE_VOICE_CALL: return C.USAGE_VOICE_COMMUNICATION; case C.STREAM_TYPE_USE_DEFAULT: case C.STREAM_TYPE_MUSIC: default: return C.USAGE_MEDIA; } }
Example 2
Source File: Util.java From MediaSDK with Apache License 2.0 | 6 votes |
/** * Returns the {@link C.AudioContentType} corresponding to the specified {@link C.StreamType}. */ @C.AudioContentType public static int getAudioContentTypeForStreamType(@C.StreamType int streamType) { switch (streamType) { case C.STREAM_TYPE_ALARM: case C.STREAM_TYPE_DTMF: case C.STREAM_TYPE_NOTIFICATION: case C.STREAM_TYPE_RING: case C.STREAM_TYPE_SYSTEM: return C.CONTENT_TYPE_SONIFICATION; case C.STREAM_TYPE_VOICE_CALL: return C.CONTENT_TYPE_SPEECH; case C.STREAM_TYPE_USE_DEFAULT: case C.STREAM_TYPE_MUSIC: default: return C.CONTENT_TYPE_MUSIC; } }
Example 3
Source File: Util.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
/** * Returns the {@link C.AudioUsage} corresponding to the specified {@link C.StreamType}. */ @C.AudioUsage public static int getAudioUsageForStreamType(@C.StreamType int streamType) { switch (streamType) { case C.STREAM_TYPE_ALARM: return C.USAGE_ALARM; case C.STREAM_TYPE_DTMF: return C.USAGE_VOICE_COMMUNICATION_SIGNALLING; case C.STREAM_TYPE_NOTIFICATION: return C.USAGE_NOTIFICATION; case C.STREAM_TYPE_RING: return C.USAGE_NOTIFICATION_RINGTONE; case C.STREAM_TYPE_SYSTEM: return C.USAGE_ASSISTANCE_SONIFICATION; case C.STREAM_TYPE_VOICE_CALL: return C.USAGE_VOICE_COMMUNICATION; case C.STREAM_TYPE_USE_DEFAULT: case C.STREAM_TYPE_MUSIC: default: return C.USAGE_MEDIA; } }
Example 4
Source File: Util.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
/** * Returns the {@link C.AudioContentType} corresponding to the specified {@link C.StreamType}. */ @C.AudioContentType public static int getAudioContentTypeForStreamType(@C.StreamType int streamType) { switch (streamType) { case C.STREAM_TYPE_ALARM: case C.STREAM_TYPE_DTMF: case C.STREAM_TYPE_NOTIFICATION: case C.STREAM_TYPE_RING: case C.STREAM_TYPE_SYSTEM: return C.CONTENT_TYPE_SONIFICATION; case C.STREAM_TYPE_VOICE_CALL: return C.CONTENT_TYPE_SPEECH; case C.STREAM_TYPE_USE_DEFAULT: case C.STREAM_TYPE_MUSIC: default: return C.CONTENT_TYPE_MUSIC; } }
Example 5
Source File: Util.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
/** * Returns the {@link C.AudioUsage} corresponding to the specified {@link C.StreamType}. */ @C.AudioUsage public static int getAudioUsageForStreamType(@C.StreamType int streamType) { switch (streamType) { case C.STREAM_TYPE_ALARM: return C.USAGE_ALARM; case C.STREAM_TYPE_DTMF: return C.USAGE_VOICE_COMMUNICATION_SIGNALLING; case C.STREAM_TYPE_NOTIFICATION: return C.USAGE_NOTIFICATION; case C.STREAM_TYPE_RING: return C.USAGE_NOTIFICATION_RINGTONE; case C.STREAM_TYPE_SYSTEM: return C.USAGE_ASSISTANCE_SONIFICATION; case C.STREAM_TYPE_VOICE_CALL: return C.USAGE_VOICE_COMMUNICATION; case C.STREAM_TYPE_USE_DEFAULT: case C.STREAM_TYPE_MUSIC: default: return C.USAGE_MEDIA; } }
Example 6
Source File: Util.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
/** * Returns the {@link C.AudioContentType} corresponding to the specified {@link C.StreamType}. */ @C.AudioContentType public static int getAudioContentTypeForStreamType(@C.StreamType int streamType) { switch (streamType) { case C.STREAM_TYPE_ALARM: case C.STREAM_TYPE_DTMF: case C.STREAM_TYPE_NOTIFICATION: case C.STREAM_TYPE_RING: case C.STREAM_TYPE_SYSTEM: return C.CONTENT_TYPE_SONIFICATION; case C.STREAM_TYPE_VOICE_CALL: return C.CONTENT_TYPE_SPEECH; case C.STREAM_TYPE_USE_DEFAULT: case C.STREAM_TYPE_MUSIC: default: return C.CONTENT_TYPE_MUSIC; } }
Example 7
Source File: Util.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
/** * Returns the {@link C.AudioUsage} corresponding to the specified {@link C.StreamType}. */ @C.AudioUsage public static int getAudioUsageForStreamType(@C.StreamType int streamType) { switch (streamType) { case C.STREAM_TYPE_ALARM: return C.USAGE_ALARM; case C.STREAM_TYPE_DTMF: return C.USAGE_VOICE_COMMUNICATION_SIGNALLING; case C.STREAM_TYPE_NOTIFICATION: return C.USAGE_NOTIFICATION; case C.STREAM_TYPE_RING: return C.USAGE_NOTIFICATION_RINGTONE; case C.STREAM_TYPE_SYSTEM: return C.USAGE_ASSISTANCE_SONIFICATION; case C.STREAM_TYPE_VOICE_CALL: return C.USAGE_VOICE_COMMUNICATION; case C.STREAM_TYPE_USE_DEFAULT: case C.STREAM_TYPE_MUSIC: default: return C.USAGE_MEDIA; } }
Example 8
Source File: Util.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
/** * Returns the {@link C.AudioContentType} corresponding to the specified {@link C.StreamType}. */ @C.AudioContentType public static int getAudioContentTypeForStreamType(@C.StreamType int streamType) { switch (streamType) { case C.STREAM_TYPE_ALARM: case C.STREAM_TYPE_DTMF: case C.STREAM_TYPE_NOTIFICATION: case C.STREAM_TYPE_RING: case C.STREAM_TYPE_SYSTEM: return C.CONTENT_TYPE_SONIFICATION; case C.STREAM_TYPE_VOICE_CALL: return C.CONTENT_TYPE_SPEECH; case C.STREAM_TYPE_USE_DEFAULT: case C.STREAM_TYPE_MUSIC: default: return C.CONTENT_TYPE_MUSIC; } }
Example 9
Source File: Util.java From Telegram with GNU General Public License v2.0 | 6 votes |
/** * Returns the {@link C.AudioUsage} corresponding to the specified {@link C.StreamType}. */ @C.AudioUsage public static int getAudioUsageForStreamType(@C.StreamType int streamType) { switch (streamType) { case C.STREAM_TYPE_ALARM: return C.USAGE_ALARM; case C.STREAM_TYPE_DTMF: return C.USAGE_VOICE_COMMUNICATION_SIGNALLING; case C.STREAM_TYPE_NOTIFICATION: return C.USAGE_NOTIFICATION; case C.STREAM_TYPE_RING: return C.USAGE_NOTIFICATION_RINGTONE; case C.STREAM_TYPE_SYSTEM: return C.USAGE_ASSISTANCE_SONIFICATION; case C.STREAM_TYPE_VOICE_CALL: return C.USAGE_VOICE_COMMUNICATION; case C.STREAM_TYPE_USE_DEFAULT: case C.STREAM_TYPE_MUSIC: default: return C.USAGE_MEDIA; } }
Example 10
Source File: Util.java From Telegram with GNU General Public License v2.0 | 6 votes |
/** * Returns the {@link C.AudioContentType} corresponding to the specified {@link C.StreamType}. */ @C.AudioContentType public static int getAudioContentTypeForStreamType(@C.StreamType int streamType) { switch (streamType) { case C.STREAM_TYPE_ALARM: case C.STREAM_TYPE_DTMF: case C.STREAM_TYPE_NOTIFICATION: case C.STREAM_TYPE_RING: case C.STREAM_TYPE_SYSTEM: return C.CONTENT_TYPE_SONIFICATION; case C.STREAM_TYPE_VOICE_CALL: return C.CONTENT_TYPE_SPEECH; case C.STREAM_TYPE_USE_DEFAULT: case C.STREAM_TYPE_MUSIC: default: return C.CONTENT_TYPE_MUSIC; } }
Example 11
Source File: Util.java From MediaSDK with Apache License 2.0 | 5 votes |
/** * Returns the {@link C.StreamType} corresponding to the specified {@link C.AudioUsage}. */ @C.StreamType public static int getStreamTypeForAudioUsage(@C.AudioUsage int usage) { switch (usage) { case C.USAGE_MEDIA: case C.USAGE_GAME: case C.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE: return C.STREAM_TYPE_MUSIC; case C.USAGE_ASSISTANCE_SONIFICATION: return C.STREAM_TYPE_SYSTEM; case C.USAGE_VOICE_COMMUNICATION: return C.STREAM_TYPE_VOICE_CALL; case C.USAGE_VOICE_COMMUNICATION_SIGNALLING: return C.STREAM_TYPE_DTMF; case C.USAGE_ALARM: return C.STREAM_TYPE_ALARM; case C.USAGE_NOTIFICATION_RINGTONE: return C.STREAM_TYPE_RING; case C.USAGE_NOTIFICATION: case C.USAGE_NOTIFICATION_COMMUNICATION_REQUEST: case C.USAGE_NOTIFICATION_COMMUNICATION_INSTANT: case C.USAGE_NOTIFICATION_COMMUNICATION_DELAYED: case C.USAGE_NOTIFICATION_EVENT: return C.STREAM_TYPE_NOTIFICATION; case C.USAGE_ASSISTANCE_ACCESSIBILITY: case C.USAGE_ASSISTANT: case C.USAGE_UNKNOWN: default: return C.STREAM_TYPE_DEFAULT; } }
Example 12
Source File: Util.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
/** * Returns the {@link C.StreamType} corresponding to the specified {@link C.AudioUsage}. */ @C.StreamType public static int getStreamTypeForAudioUsage(@C.AudioUsage int usage) { switch (usage) { case C.USAGE_MEDIA: case C.USAGE_GAME: case C.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE: return C.STREAM_TYPE_MUSIC; case C.USAGE_ASSISTANCE_SONIFICATION: return C.STREAM_TYPE_SYSTEM; case C.USAGE_VOICE_COMMUNICATION: return C.STREAM_TYPE_VOICE_CALL; case C.USAGE_VOICE_COMMUNICATION_SIGNALLING: return C.STREAM_TYPE_DTMF; case C.USAGE_ALARM: return C.STREAM_TYPE_ALARM; case C.USAGE_NOTIFICATION_RINGTONE: return C.STREAM_TYPE_RING; case C.USAGE_NOTIFICATION: case C.USAGE_NOTIFICATION_COMMUNICATION_REQUEST: case C.USAGE_NOTIFICATION_COMMUNICATION_INSTANT: case C.USAGE_NOTIFICATION_COMMUNICATION_DELAYED: case C.USAGE_NOTIFICATION_EVENT: return C.STREAM_TYPE_NOTIFICATION; case C.USAGE_ASSISTANCE_ACCESSIBILITY: case C.USAGE_UNKNOWN: default: return C.STREAM_TYPE_DEFAULT; } }
Example 13
Source File: Util.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
/** * Returns the {@link C.StreamType} corresponding to the specified {@link C.AudioUsage}. */ @C.StreamType public static int getStreamTypeForAudioUsage(@C.AudioUsage int usage) { switch (usage) { case C.USAGE_MEDIA: case C.USAGE_GAME: case C.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE: return C.STREAM_TYPE_MUSIC; case C.USAGE_ASSISTANCE_SONIFICATION: return C.STREAM_TYPE_SYSTEM; case C.USAGE_VOICE_COMMUNICATION: return C.STREAM_TYPE_VOICE_CALL; case C.USAGE_VOICE_COMMUNICATION_SIGNALLING: return C.STREAM_TYPE_DTMF; case C.USAGE_ALARM: return C.STREAM_TYPE_ALARM; case C.USAGE_NOTIFICATION_RINGTONE: return C.STREAM_TYPE_RING; case C.USAGE_NOTIFICATION: case C.USAGE_NOTIFICATION_COMMUNICATION_REQUEST: case C.USAGE_NOTIFICATION_COMMUNICATION_INSTANT: case C.USAGE_NOTIFICATION_COMMUNICATION_DELAYED: case C.USAGE_NOTIFICATION_EVENT: return C.STREAM_TYPE_NOTIFICATION; case C.USAGE_ASSISTANCE_ACCESSIBILITY: case C.USAGE_UNKNOWN: default: return C.STREAM_TYPE_DEFAULT; } }
Example 14
Source File: Util.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
/** * Returns the {@link C.StreamType} corresponding to the specified {@link C.AudioUsage}. */ @C.StreamType public static int getStreamTypeForAudioUsage(@C.AudioUsage int usage) { switch (usage) { case C.USAGE_MEDIA: case C.USAGE_GAME: case C.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE: return C.STREAM_TYPE_MUSIC; case C.USAGE_ASSISTANCE_SONIFICATION: return C.STREAM_TYPE_SYSTEM; case C.USAGE_VOICE_COMMUNICATION: return C.STREAM_TYPE_VOICE_CALL; case C.USAGE_VOICE_COMMUNICATION_SIGNALLING: return C.STREAM_TYPE_DTMF; case C.USAGE_ALARM: return C.STREAM_TYPE_ALARM; case C.USAGE_NOTIFICATION_RINGTONE: return C.STREAM_TYPE_RING; case C.USAGE_NOTIFICATION: case C.USAGE_NOTIFICATION_COMMUNICATION_REQUEST: case C.USAGE_NOTIFICATION_COMMUNICATION_INSTANT: case C.USAGE_NOTIFICATION_COMMUNICATION_DELAYED: case C.USAGE_NOTIFICATION_EVENT: return C.STREAM_TYPE_NOTIFICATION; case C.USAGE_ASSISTANCE_ACCESSIBILITY: case C.USAGE_ASSISTANT: case C.USAGE_UNKNOWN: default: return C.STREAM_TYPE_DEFAULT; } }
Example 15
Source File: Util.java From Telegram with GNU General Public License v2.0 | 5 votes |
/** * Returns the {@link C.StreamType} corresponding to the specified {@link C.AudioUsage}. */ @C.StreamType public static int getStreamTypeForAudioUsage(@C.AudioUsage int usage) { switch (usage) { case C.USAGE_MEDIA: case C.USAGE_GAME: case C.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE: return C.STREAM_TYPE_MUSIC; case C.USAGE_ASSISTANCE_SONIFICATION: return C.STREAM_TYPE_SYSTEM; case C.USAGE_VOICE_COMMUNICATION: return C.STREAM_TYPE_VOICE_CALL; case C.USAGE_VOICE_COMMUNICATION_SIGNALLING: return C.STREAM_TYPE_DTMF; case C.USAGE_ALARM: return C.STREAM_TYPE_ALARM; case C.USAGE_NOTIFICATION_RINGTONE: return C.STREAM_TYPE_RING; case C.USAGE_NOTIFICATION: case C.USAGE_NOTIFICATION_COMMUNICATION_REQUEST: case C.USAGE_NOTIFICATION_COMMUNICATION_INSTANT: case C.USAGE_NOTIFICATION_COMMUNICATION_DELAYED: case C.USAGE_NOTIFICATION_EVENT: return C.STREAM_TYPE_NOTIFICATION; case C.USAGE_ASSISTANCE_ACCESSIBILITY: case C.USAGE_ASSISTANT: case C.USAGE_UNKNOWN: default: return C.STREAM_TYPE_DEFAULT; } }