This repository has been archived by the owner on Jan 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove email address in copyright statement.
- Loading branch information
Showing
19 changed files
with
35 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# pulseaudio-modules-bt | ||
# | ||
# Copyright (C) 2018-2019 Huang-Huang Bao <[email protected]> | ||
# Copyright (C) 2018-2019 Huang-Huang Bao | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,7 +173,7 @@ see [Wiki](https://github.com/EHfive/pulseaudio-modules-bt/wiki) | |
``` | ||
pulseaudio-modules-bt | ||
Copyright (C) 2018-2019 Huang-Huang Bao <[email protected]> | ||
Copyright (C) 2018-2019 Huang-Huang Bao | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* pulseaudio-modules-bt | ||
* | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* pulseaudio-modules-bt | ||
* | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* pulseaudio-modules-bt | ||
* | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* pulseaudio-modules-bt | ||
* | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* pulseaudio-modules-bt | ||
* | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -45,6 +45,7 @@ | |
#define LDAC_ABR_THRESHOLD_DANGEROUSTREND 4 | ||
#define LDAC_ABR_THRESHOLD_SAFETY_FOR_HQSQ 2 | ||
|
||
#define TX_LENGTH_ROUND_SIZE 3 | ||
|
||
typedef struct ldac_info { | ||
HANDLE_LDAC_BT hLdacBt; | ||
|
@@ -69,6 +70,9 @@ typedef struct ldac_info { | |
uint16_t seq_num; | ||
uint32_t layer_specific; | ||
uint32_t written; | ||
size_t tx_length_round[TX_LENGTH_ROUND_SIZE]; | ||
int tx_length_index; | ||
|
||
size_t tx_length; | ||
|
||
size_t mtu; | ||
|
@@ -89,6 +93,10 @@ pa_ldac_encoder_init(pa_a2dp_source_read_cb_t read_cb, pa_a2dp_source_read_buf_f | |
if(ldac_abr_loaded) | ||
info->enable_abr = true; | ||
info->force_pa_fmt = PA_SAMPLE_INVALID; | ||
|
||
for(int i=0;i<TX_LENGTH_ROUND_SIZE;++i){ | ||
info->tx_length_round[i] = 0; | ||
} | ||
return true; | ||
} | ||
|
||
|
@@ -168,7 +176,7 @@ pa_ldac_encode(uint32_t timestamp, void *write_buf, size_t write_buf_size, size_ | |
ldac_ABR_Proc_func(ldac_info->hLdacBt, ldac_info->hLdacAbr, | ||
(unsigned int) (ldac_info->tx_length / ldac_info->q_write_block_size), | ||
(unsigned int) ldac_info->enable_abr); | ||
ldac_info->tx_length = 0; | ||
// ldac_info->tx_length = 0; | ||
} | ||
|
||
|
||
|
@@ -440,8 +448,14 @@ static void pa_ldac_setup_stream(void **codec_data) { | |
|
||
static void pa_ldac_set_tx_length(size_t len, void **codec_data) { | ||
ldac_info_t *ldac_info = *codec_data; | ||
size_t prev; | ||
pa_assert(ldac_info); | ||
ldac_info->tx_length += len; | ||
|
||
prev = ldac_info->tx_length_round[(ldac_info->tx_length_index + TX_LENGTH_ROUND_SIZE - 1)/TX_LENGTH_ROUND_SIZE]; | ||
len = len ? len : (prev + len) / 2; | ||
ldac_info->tx_length_round[ldac_info->tx_length_index] = len; | ||
ldac_info->tx_length_index = (ldac_info->tx_length_index + 1) / TX_LENGTH_ROUND_SIZE; | ||
ldac_info->tx_length = ldac_info->tx_length_round[(ldac_info->tx_length_index + 1)/TX_LENGTH_ROUND_SIZE]; | ||
}; | ||
|
||
static void pa_ldac_free(void **codec_data) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* pulseaudio-modules-bt | ||
* | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* pulseaudio-modules-bt | ||
* | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* pulseaudio-modules-bt | ||
* | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* pulseaudio-modules-bt | ||
* | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* pulseaudio-modules-bt | ||
* | ||
* Copyright 2008-2013 João Paulo Rechi Vita | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* pulseaudio-modules-bt | ||
* | ||
* Copyright 2008-2013 João Paulo Rechi Vita | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* pulseaudio-modules-bt | ||
* | ||
* Copyright 2008-2013 João Paulo Rechi Vita | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* pulseaudio-modules-bt | ||
* | ||
* Copyright 2008-2013 João Paulo Rechi Vita | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* pulseaudio-modules-bt | ||
* | ||
* Copyright 2013 João Paulo Rechi Vita | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* Copyright 2006 Lennart Poettering | ||
* Copyright 2009 Canonical Ltd | ||
* Copyright (C) 2012 Intel Corporation | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* | ||
* Copyright 2008-2013 João Paulo Rechi Vita | ||
* Copyright 2011-2013 BMW Car IT GmbH. | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* pulseaudio-modules-bt | ||
* | ||
* Copyright 2008-2013 João Paulo Rechi Vita | ||
* Copyright 2018-2019 Huang-Huang Bao <[email protected]> | ||
* Copyright 2018-2019 Huang-Huang Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|