Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
Remove email address in copyright statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
EHfive committed Mar 9, 2019
1 parent dbc32e6 commit c27dc5b
Show file tree
Hide file tree
Showing 19 changed files with 35 additions and 21 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# pulseaudio-modules-bt
#
# Copyright (C) 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
# 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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ see [Wiki](https://github.com/EHfive/pulseaudio-modules-bt/wiki)
```
pulseaudio-modules-bt
Copyright (C) 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
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
Expand Down
2 changes: 1 addition & 1 deletion config.h.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* pulseaudio-modules-bt
*
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bluetooth/a2dp/a2dp-api.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* pulseaudio-modules-bt
*
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bluetooth/a2dp/a2dp_aac.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* pulseaudio-modules-bt
*
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bluetooth/a2dp/a2dp_aptx.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* pulseaudio-modules-bt
*
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down
20 changes: 17 additions & 3 deletions src/modules/bluetooth/a2dp/a2dp_ldac.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* pulseaudio-modules-bt
*
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
}


Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bluetooth/a2dp/a2dp_sbc.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* pulseaudio-modules-bt
*
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bluetooth/a2dp/a2dp_util.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* pulseaudio-modules-bt
*
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bluetooth/a2dp/aptx_libs.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* pulseaudio-modules-bt
*
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bluetooth/a2dp/ldac_libs.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* pulseaudio-modules-bt
*
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bluetooth/backend-native.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* pulseaudio-modules-bt
*
* Copyright 2008-2013 João Paulo Rechi Vita
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bluetooth/backend-ofono.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* pulseaudio-modules-bt
*
* Copyright 2008-2013 João Paulo Rechi Vita
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bluetooth/bluez5-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* pulseaudio-modules-bt
*
* Copyright 2008-2013 João Paulo Rechi Vita
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bluetooth/bluez5-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* pulseaudio-modules-bt
*
* Copyright 2008-2013 João Paulo Rechi Vita
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bluetooth/module-bluetooth-discover.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* pulseaudio-modules-bt
*
* Copyright 2013 João Paulo Rechi Vita
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bluetooth/module-bluetooth-policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright 2006 Lennart Poettering
* Copyright 2009 Canonical Ltd
* Copyright (C) 2012 Intel Corporation
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bluetooth/module-bluez5-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <eh5@sokka.cn>
* 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
Expand Down
2 changes: 1 addition & 1 deletion src/modules/bluetooth/module-bluez5-discover.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* pulseaudio-modules-bt
*
* Copyright 2008-2013 João Paulo Rechi Vita
* Copyright 2018-2019 Huang-Huang Bao <eh5@sokka.cn>
* 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
Expand Down

0 comments on commit c27dc5b

Please sign in to comment.