Merge branch 'v0.23.x'
This commit is contained in:
commit
946cf25732
2
NEWS
2
NEWS
@ -3,6 +3,8 @@ ver 0.24 (not yet released)
|
|||||||
- add option "mixramp_analyzer" to scan MixRamp tags on-the-fly
|
- add option "mixramp_analyzer" to scan MixRamp tags on-the-fly
|
||||||
|
|
||||||
ver 0.23.6 (not yet released)
|
ver 0.23.6 (not yet released)
|
||||||
|
* decoder
|
||||||
|
- opus: fix "readpicture" on Opus files
|
||||||
|
|
||||||
ver 0.23.5 (2021/12/01)
|
ver 0.23.5 (2021/12/01)
|
||||||
* protocol
|
* protocol
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
|
||||||
|
|
||||||
<application android:allowBackup="true"
|
<application android:allowBackup="true"
|
||||||
android:requestLegacyExternalStorage="true"
|
android:requestLegacyExternalStorage="true"
|
||||||
@ -43,7 +41,6 @@
|
|||||||
<receiver android:name=".Receiver">
|
<receiver android:name=".Receiver">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||||
<action android:name="android.intent.action.HEADSET_PLUG" />
|
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
<service android:name=".Main" android:process=":main"/>
|
<service android:name=".Main" android:process=":main"/>
|
||||||
|
@ -24,14 +24,13 @@ import android.app.Notification;
|
|||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
import android.bluetooth.BluetoothDevice;
|
|
||||||
import android.bluetooth.BluetoothClass;
|
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.content.ServiceConnection;
|
import android.content.ServiceConnection;
|
||||||
|
import android.media.AudioManager;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.PowerManager;
|
import android.os.PowerManager;
|
||||||
@ -200,24 +199,14 @@ public class Main extends Service implements Runnable {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
IntentFilter filter = new IntentFilter();
|
IntentFilter filter = new IntentFilter();
|
||||||
filter.addAction(Intent.ACTION_HEADSET_PLUG);
|
filter.addAction(AudioManager.ACTION_AUDIO_BECOMING_NOISY);
|
||||||
filter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECT_REQUESTED);
|
|
||||||
filter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
|
|
||||||
registerReceiver(new BroadcastReceiver() {
|
registerReceiver(new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
if (!mPauseOnHeadphonesDisconnect) {
|
if (!mPauseOnHeadphonesDisconnect)
|
||||||
return;
|
return;
|
||||||
}
|
if (intent.getAction() == AudioManager.ACTION_AUDIO_BECOMING_NOISY)
|
||||||
|
pause();
|
||||||
if (intent.getAction().equals(Intent.ACTION_HEADSET_PLUG)) {
|
|
||||||
if (intent.hasExtra("state") && intent.getIntExtra("state", 0) == 0)
|
|
||||||
pause();
|
|
||||||
} else {
|
|
||||||
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
|
|
||||||
if (device.getBluetoothClass().hasService(BluetoothClass.Service.AUDIO))
|
|
||||||
pause();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}, filter);
|
}, filter);
|
||||||
|
|
||||||
|
@ -25,16 +25,18 @@ import android.content.Intent;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
public class Receiver extends BroadcastReceiver {
|
public class Receiver extends BroadcastReceiver {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
Log.d("Receiver", "onReceive: " + intent);
|
Log.d("Receiver", "onReceive: " + intent);
|
||||||
if (intent.getAction() == "android.intent.action.BOOT_COMPLETED") {
|
if (intent.getAction() == "android.intent.action.BOOT_COMPLETED") {
|
||||||
if (Settings.Preferences.getBoolean(context,
|
if (Settings.Preferences.getBoolean(context,
|
||||||
Settings.Preferences.KEY_RUN_ON_BOOT, false)) {
|
Settings.Preferences.KEY_RUN_ON_BOOT,
|
||||||
final boolean wakelock = Settings.Preferences.getBoolean(context,
|
false)) {
|
||||||
Settings.Preferences.KEY_WAKELOCK, false);
|
final boolean wakelock =
|
||||||
Main.start(context, wakelock);
|
Settings.Preferences.getBoolean(context,
|
||||||
}
|
Settings.Preferences.KEY_WAKELOCK, false);
|
||||||
}
|
Main.start(context, wakelock);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,19 +53,21 @@ pkgconfig = '{toolchain.pkg_config}'
|
|||||||
f.write(f"""
|
f.write(f"""
|
||||||
[properties]
|
[properties]
|
||||||
root = '{toolchain.install_prefix}'
|
root = '{toolchain.install_prefix}'
|
||||||
|
|
||||||
[built-in options]
|
|
||||||
c_args = {repr((toolchain.cppflags + ' ' + toolchain.cflags).split())}
|
|
||||||
c_link_args = {repr(toolchain.ldflags.split() + toolchain.libs.split())}
|
|
||||||
|
|
||||||
cpp_args = {repr((toolchain.cppflags + ' ' + toolchain.cxxflags).split())}
|
|
||||||
cpp_link_args = {repr(toolchain.ldflags.split() + toolchain.libs.split())}
|
|
||||||
""")
|
""")
|
||||||
|
|
||||||
if 'android' in toolchain.arch:
|
if 'android' in toolchain.arch:
|
||||||
f.write("""
|
f.write("""
|
||||||
# Keep Meson from executing Android-x86 test binariees
|
# Keep Meson from executing Android-x86 test binariees
|
||||||
needs_exe_wrapper = true
|
needs_exe_wrapper = true
|
||||||
|
""")
|
||||||
|
|
||||||
|
f.write(f"""
|
||||||
|
[built-in options]
|
||||||
|
c_args = {repr((toolchain.cppflags + ' ' + toolchain.cflags).split())}
|
||||||
|
c_link_args = {repr(toolchain.ldflags.split() + toolchain.libs.split())}
|
||||||
|
|
||||||
|
cpp_args = {repr((toolchain.cppflags + ' ' + toolchain.cxxflags).split())}
|
||||||
|
cpp_link_args = {repr(toolchain.ldflags.split() + toolchain.libs.split())}
|
||||||
""")
|
""")
|
||||||
|
|
||||||
f.write(f"""
|
f.write(f"""
|
||||||
|
@ -91,7 +91,8 @@ ScanOpusTags(const void *data, size_t size,
|
|||||||
if (!r.Expect("OpusTags", 8))
|
if (!r.Expect("OpusTags", 8))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!handler.WantPair() && !handler.WantTag())
|
if (!handler.WantPair() && !handler.WantTag() &&
|
||||||
|
!handler.WantPicture())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (!r.SkipString())
|
if (!r.SkipString())
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include "Error.hxx"
|
#include "Error.hxx"
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
#include <alsa/error.h>
|
#include <alsa/error.h>
|
||||||
|
|
||||||
namespace Alsa {
|
namespace Alsa {
|
||||||
|
@ -50,4 +50,4 @@ MakeError(int error, const char *msg) noexcept
|
|||||||
return std::system_error(error, error_category, msg);
|
return std::system_error(error, error_category, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Avahi
|
} // namespace Alsa
|
||||||
|
Loading…
Reference in New Issue
Block a user