mirror of
https://github.com/NekoX-Dev/NekoX.git
synced 2025-01-26 06:49:58 +01:00
Add WAV support (#475)
This commit is contained in:
parent
4e07c7f573
commit
e38ef93fad
@ -90,6 +90,9 @@ public final class FfmpegLibrary {
|
||||
return "flac";
|
||||
case MimeTypes.AUDIO_ALAC:
|
||||
return "alac";
|
||||
case MimeTypes.AUDIO_WAV:
|
||||
case MimeTypes.AUDIO_X_WAV:
|
||||
return "wav";
|
||||
case MimeTypes.AUDIO_MLAW:
|
||||
return "pcm_mulaw";
|
||||
case MimeTypes.AUDIO_ALAW:
|
||||
|
@ -519,6 +519,8 @@ public final class MediaCodecInfo {
|
||||
|| MimeTypes.AUDIO_FLAC.equals(mimeType)
|
||||
|| MimeTypes.AUDIO_ALAW.equals(mimeType)
|
||||
|| MimeTypes.AUDIO_MLAW.equals(mimeType)
|
||||
|| MimeTypes.AUDIO_WAV.equals(mimeType)
|
||||
|| MimeTypes.AUDIO_X_WAV.equals(mimeType)
|
||||
|| MimeTypes.AUDIO_MSGSM.equals(mimeType)) {
|
||||
// Platform code should have set a default.
|
||||
return maxChannelCount;
|
||||
|
@ -70,6 +70,8 @@ public final class MimeTypes {
|
||||
public static final String AUDIO_FLAC = BASE_TYPE_AUDIO + "/flac";
|
||||
public static final String AUDIO_ALAC = BASE_TYPE_AUDIO + "/alac";
|
||||
public static final String AUDIO_MSGSM = BASE_TYPE_AUDIO + "/gsm";
|
||||
public static final String AUDIO_WAV = BASE_TYPE_AUDIO + "/wav";
|
||||
public static final String AUDIO_X_WAV = BASE_TYPE_AUDIO + "/x-wav";
|
||||
public static final String AUDIO_UNKNOWN = BASE_TYPE_AUDIO + "/x-unknown";
|
||||
|
||||
public static final String TEXT_VTT = BASE_TYPE_TEXT + "/vtt";
|
||||
|
@ -4859,7 +4859,7 @@ public class MessageObject {
|
||||
}
|
||||
if (!TextUtils.isEmpty(document.mime_type)) {
|
||||
String mime = document.mime_type.toLowerCase();
|
||||
if (mime.equals("audio/flac") || mime.equals("audio/ogg") || mime.equals("audio/opus") || mime.equals("audio/x-opus+ogg")) {
|
||||
if (mime.equals("audio/flac") || mime.equals("audio/ogg") || mime.equals("audio/opus") || mime.equals("audio/x-opus+ogg") || mime.equals("audio/wav") || mime.equals("audio/x-wav")) {
|
||||
return true;
|
||||
} else if (mime.equals("application/octet-stream") && FileLoader.getDocumentFileName(document).endsWith(".opus")) {
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user