Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: new audio backend #14

Merged
merged 45 commits into from
Jul 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
fd90471
completely reworked player
Jun 14, 2022
eaf3e43
duration
Jun 14, 2022
5da02ab
elapsed
Jun 14, 2022
cd05abb
prev + next
Jun 14, 2022
cd02fef
volume
Jun 14, 2022
990d7b5
handle decode errors
Jun 14, 2022
2d23d70
error cleanup
Jun 14, 2022
aeafa5c
fixed mp3 and alac not playing
Jun 14, 2022
6aa3f25
various fixes
Jun 15, 2022
bc13b1f
fixed broken volume when playing new songs
Jun 15, 2022
5b58565
Merge branch 'main' into new_player
Jun 15, 2022
2053443
cleanup
Jun 15, 2022
842b024
ci: build action
Jun 18, 2022
1820fe8
Merge branch 'main' into new_player
Jun 22, 2022
02c55ea
Clean failed merge from 'main'
Jun 22, 2022
efb48ca
Merge branch 'main' into new_player
Jun 22, 2022
7a508eb
Clean failed merge into 'main'
Jun 22, 2022
2f52d16
Merged 'main into 'new_player'
Jun 25, 2022
4220056
Merge branch 'main' into new_player
Jun 25, 2022
7ddee68
fix: update now works when from == to
Jul 3, 2022
d72f7ea
cleanup
Jul 3, 2022
8aea6f8
simplified resampler
Jul 6, 2022
5dfddc0
cleanup
Jul 6, 2022
c680699
cleanup
Jul 6, 2022
4d668a5
Merge branch 'main' into new_player
Jul 6, 2022
8af6c70
fix: left over error from merge
Jul 6, 2022
6653b2d
removed update function
Jul 7, 2022
d36cb20
changed mem::swap to mem::take
Jul 7, 2022
521d38d
fix build failing because of nightly feature
Jul 7, 2022
334718a
clippy
Jul 7, 2022
b978fe9
cleanup
Jul 11, 2022
05d7bdb
reworked player again
Jul 11, 2022
1815fa2
fix: volume was not saved when changing tracks
Jul 11, 2022
bbf47cf
fixed play and pause not working
Jul 11, 2022
41076f1
fixed player being unable to stop
Jul 11, 2022
f774172
fixed click at start up
Jul 11, 2022
90ff212
fixed heap overrun
Jul 11, 2022
934d1bb
fixed an issue where seeking would cause EOF
Jul 11, 2022
93eb0e4
prebuild the seek index
Jul 11, 2022
4e7b1df
store replay gain as a float instead of a double
Jul 11, 2022
04f4119
fixed: output devices can now be selected in the settings
Jul 12, 2022
bbd6936
scuffed error handling in the status bar
Jul 12, 2022
dfaeac3
cleanup error handling
Jul 12, 2022
14d6c3f
more error handling
Jul 12, 2022
defb387
handle some edge cases for errors
Jul 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gonk-database/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl Database {
}
}

self.handle = Some(thread::spawn(|| rescan_folders()));
self.handle = Some(thread::spawn(rescan_folders));
}

pub fn state(&mut self) -> State {
Expand Down
9 changes: 3 additions & 6 deletions gonk-database/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub fn create_tables(conn: &Connection) {
disc INTEGER NOT NULL,
number INTEGER NOT NULL,
path TEXT NOT NULL,
gain DOUBLE NOT NULL,
gain FLOAT NOT NULL,
album TEXT NOT NULL,
artist TEXT NOT NULL,
folder TEXT NOT NULL,
Expand Down Expand Up @@ -127,10 +127,7 @@ pub fn collect_songs(path: &str) -> Vec<Song> {
})
.collect();

paths
.par_iter()
.flat_map(|path| Song::from(&path))
.collect()
paths.par_iter().flat_map(|path| Song::from(path)).collect()
}

pub fn rescan_folders() {
Expand All @@ -145,7 +142,7 @@ pub fn rescan_folders() {
}

pub fn add_folder(folder: &str) {
let folder = folder.replace("\\", "/");
let folder = folder.replace('/', "\\");

conn()
.execute(
Expand Down
4 changes: 2 additions & 2 deletions gonk-database/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub fn folders() -> Vec<String> {
}

pub fn remove_folder(path: &str) -> Result<(), &str> {
let path = path.replace("\\", "/");
let path = path.replace('/', "\\");
let conn = conn();

conn.execute("DELETE FROM song WHERE folder = ?", [&path])
Expand Down Expand Up @@ -146,7 +146,7 @@ pub fn songs_from_ids(ids: &[usize]) -> Vec<Song> {
//Remove the last 'UNION ALL'
let sql = &sql[..sql.len() - 10];

let mut stmt = conn.prepare(&sql).unwrap();
let mut stmt = conn.prepare(sql).unwrap();

stmt.query_map([], |row| Ok(song(row)))
.unwrap()
Expand Down
94 changes: 0 additions & 94 deletions gonk-player/src/conversions/channels.rs

This file was deleted.

15 changes: 0 additions & 15 deletions gonk-player/src/conversions/mod.rs

This file was deleted.

155 changes: 0 additions & 155 deletions gonk-player/src/conversions/sample.rs

This file was deleted.

Loading