old school music tracker audio backend

clean-ups

luca3s 7bda1972 6cac585c

+29 -530
.DS_Store

This is a binary file and will not be displayed.

+7 -81
Cargo.lock
··· 214 214 checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 215 215 216 216 [[package]] 217 - name = "futures" 218 - version = "0.3.30" 219 - source = "registry+https://github.com/rust-lang/crates.io-index" 220 - checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" 221 - dependencies = [ 222 - "futures-channel", 223 - "futures-core", 224 - "futures-io", 225 - "futures-sink", 226 - "futures-task", 227 - "futures-util", 228 - ] 229 - 230 - [[package]] 231 - name = "futures-channel" 232 - version = "0.3.30" 233 - source = "registry+https://github.com/rust-lang/crates.io-index" 234 - checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" 235 - dependencies = [ 236 - "futures-core", 237 - "futures-sink", 238 - ] 239 - 240 - [[package]] 241 - name = "futures-core" 242 - version = "0.3.30" 243 - source = "registry+https://github.com/rust-lang/crates.io-index" 244 - checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" 245 - 246 - [[package]] 247 - name = "futures-io" 248 - version = "0.3.30" 249 - source = "registry+https://github.com/rust-lang/crates.io-index" 250 - checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" 251 - 252 - [[package]] 253 - name = "futures-sink" 254 - version = "0.3.30" 255 - source = "registry+https://github.com/rust-lang/crates.io-index" 256 - checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" 257 - 258 - [[package]] 259 - name = "futures-task" 260 - version = "0.3.30" 261 - source = "registry+https://github.com/rust-lang/crates.io-index" 262 - checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" 263 - 264 - [[package]] 265 - name = "futures-util" 266 - version = "0.3.30" 267 - source = "registry+https://github.com/rust-lang/crates.io-index" 268 - checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" 269 - dependencies = [ 270 - "futures-channel", 271 - "futures-core", 272 - "futures-io", 273 - "futures-sink", 274 - "futures-task", 275 - "memchr", 276 - "pin-project-lite", 277 - "pin-utils", 278 - "slab", 279 - ] 280 - 281 - [[package]] 282 217 name = "generator" 283 218 version = "0.8.3" 284 219 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 315 250 dependencies = [ 316 251 "basedrop", 317 252 "cpal", 318 - "futures", 319 253 "hound", 254 + "rtrb", 320 255 "simple-left-right", 321 256 ] 322 257 ··· 582 517 checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" 583 518 584 519 [[package]] 585 - name = "pin-utils" 586 - version = "0.1.0" 587 - source = "registry+https://github.com/rust-lang/crates.io-index" 588 - checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 589 - 590 - [[package]] 591 520 name = "pkg-config" 592 521 version = "0.3.31" 593 522 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 665 594 checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" 666 595 667 596 [[package]] 597 + name = "rtrb" 598 + version = "0.3.1" 599 + source = "registry+https://github.com/rust-lang/crates.io-index" 600 + checksum = "f3f94e84c073f3b85d4012b44722fa8842b9986d741590d4f2636ad0a5b14143" 601 + 602 + [[package]] 668 603 name = "rustc-hash" 669 604 version = "1.1.0" 670 605 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 712 647 dependencies = [ 713 648 "crossbeam-utils", 714 649 "loom", 715 - ] 716 - 717 - [[package]] 718 - name = "slab" 719 - version = "0.4.9" 720 - source = "registry+https://github.com/rust-lang/crates.io-index" 721 - checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 722 - dependencies = [ 723 - "autocfg", 724 650 ] 725 651 726 652 [[package]]
-440
simple-left-right/Cargo.lock
··· 1 - # This file is automatically @generated by Cargo. 2 - # It is not intended for manual editing. 3 - version = 3 4 - 5 - [[package]] 6 - name = "aho-corasick" 7 - version = "1.1.3" 8 - source = "registry+https://github.com/rust-lang/crates.io-index" 9 - checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 10 - dependencies = [ 11 - "memchr", 12 - ] 13 - 14 - [[package]] 15 - name = "cfg-if" 16 - version = "1.0.0" 17 - source = "registry+https://github.com/rust-lang/crates.io-index" 18 - checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 19 - 20 - [[package]] 21 - name = "crossbeam-utils" 22 - version = "0.8.20" 23 - source = "registry+https://github.com/rust-lang/crates.io-index" 24 - checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" 25 - 26 - [[package]] 27 - name = "generator" 28 - version = "0.8.2" 29 - source = "registry+https://github.com/rust-lang/crates.io-index" 30 - checksum = "979f00864edc7516466d6b3157706e06c032f22715700ddd878228a91d02bc56" 31 - dependencies = [ 32 - "cfg-if", 33 - "libc", 34 - "log", 35 - "rustversion", 36 - "windows", 37 - ] 38 - 39 - [[package]] 40 - name = "lazy_static" 41 - version = "1.5.0" 42 - source = "registry+https://github.com/rust-lang/crates.io-index" 43 - checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 44 - 45 - [[package]] 46 - name = "libc" 47 - version = "0.2.158" 48 - source = "registry+https://github.com/rust-lang/crates.io-index" 49 - checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" 50 - 51 - [[package]] 52 - name = "log" 53 - version = "0.4.22" 54 - source = "registry+https://github.com/rust-lang/crates.io-index" 55 - checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" 56 - 57 - [[package]] 58 - name = "loom" 59 - version = "0.7.2" 60 - source = "registry+https://github.com/rust-lang/crates.io-index" 61 - checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" 62 - dependencies = [ 63 - "cfg-if", 64 - "generator", 65 - "scoped-tls", 66 - "tracing", 67 - "tracing-subscriber", 68 - ] 69 - 70 - [[package]] 71 - name = "matchers" 72 - version = "0.1.0" 73 - source = "registry+https://github.com/rust-lang/crates.io-index" 74 - checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" 75 - dependencies = [ 76 - "regex-automata 0.1.10", 77 - ] 78 - 79 - [[package]] 80 - name = "memchr" 81 - version = "2.7.4" 82 - source = "registry+https://github.com/rust-lang/crates.io-index" 83 - checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 84 - 85 - [[package]] 86 - name = "nu-ansi-term" 87 - version = "0.46.0" 88 - source = "registry+https://github.com/rust-lang/crates.io-index" 89 - checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" 90 - dependencies = [ 91 - "overload", 92 - "winapi", 93 - ] 94 - 95 - [[package]] 96 - name = "once_cell" 97 - version = "1.19.0" 98 - source = "registry+https://github.com/rust-lang/crates.io-index" 99 - checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 100 - 101 - [[package]] 102 - name = "overload" 103 - version = "0.1.1" 104 - source = "registry+https://github.com/rust-lang/crates.io-index" 105 - checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" 106 - 107 - [[package]] 108 - name = "pin-project-lite" 109 - version = "0.2.14" 110 - source = "registry+https://github.com/rust-lang/crates.io-index" 111 - checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" 112 - 113 - [[package]] 114 - name = "proc-macro2" 115 - version = "1.0.86" 116 - source = "registry+https://github.com/rust-lang/crates.io-index" 117 - checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" 118 - dependencies = [ 119 - "unicode-ident", 120 - ] 121 - 122 - [[package]] 123 - name = "quote" 124 - version = "1.0.37" 125 - source = "registry+https://github.com/rust-lang/crates.io-index" 126 - checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" 127 - dependencies = [ 128 - "proc-macro2", 129 - ] 130 - 131 - [[package]] 132 - name = "regex" 133 - version = "1.10.6" 134 - source = "registry+https://github.com/rust-lang/crates.io-index" 135 - checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" 136 - dependencies = [ 137 - "aho-corasick", 138 - "memchr", 139 - "regex-automata 0.4.7", 140 - "regex-syntax 0.8.4", 141 - ] 142 - 143 - [[package]] 144 - name = "regex-automata" 145 - version = "0.1.10" 146 - source = "registry+https://github.com/rust-lang/crates.io-index" 147 - checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" 148 - dependencies = [ 149 - "regex-syntax 0.6.29", 150 - ] 151 - 152 - [[package]] 153 - name = "regex-automata" 154 - version = "0.4.7" 155 - source = "registry+https://github.com/rust-lang/crates.io-index" 156 - checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" 157 - dependencies = [ 158 - "aho-corasick", 159 - "memchr", 160 - "regex-syntax 0.8.4", 161 - ] 162 - 163 - [[package]] 164 - name = "regex-syntax" 165 - version = "0.6.29" 166 - source = "registry+https://github.com/rust-lang/crates.io-index" 167 - checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" 168 - 169 - [[package]] 170 - name = "regex-syntax" 171 - version = "0.8.4" 172 - source = "registry+https://github.com/rust-lang/crates.io-index" 173 - checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" 174 - 175 - [[package]] 176 - name = "rustversion" 177 - version = "1.0.17" 178 - source = "registry+https://github.com/rust-lang/crates.io-index" 179 - checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" 180 - 181 - [[package]] 182 - name = "scoped-tls" 183 - version = "1.0.1" 184 - source = "registry+https://github.com/rust-lang/crates.io-index" 185 - checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" 186 - 187 - [[package]] 188 - name = "sharded-slab" 189 - version = "0.1.7" 190 - source = "registry+https://github.com/rust-lang/crates.io-index" 191 - checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" 192 - dependencies = [ 193 - "lazy_static", 194 - ] 195 - 196 - [[package]] 197 - name = "simple-left-right" 198 - version = "0.1.0" 199 - dependencies = [ 200 - "crossbeam-utils", 201 - "loom", 202 - ] 203 - 204 - [[package]] 205 - name = "smallvec" 206 - version = "1.13.2" 207 - source = "registry+https://github.com/rust-lang/crates.io-index" 208 - checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 209 - 210 - [[package]] 211 - name = "syn" 212 - version = "2.0.77" 213 - source = "registry+https://github.com/rust-lang/crates.io-index" 214 - checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" 215 - dependencies = [ 216 - "proc-macro2", 217 - "quote", 218 - "unicode-ident", 219 - ] 220 - 221 - [[package]] 222 - name = "thread_local" 223 - version = "1.1.8" 224 - source = "registry+https://github.com/rust-lang/crates.io-index" 225 - checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" 226 - dependencies = [ 227 - "cfg-if", 228 - "once_cell", 229 - ] 230 - 231 - [[package]] 232 - name = "tracing" 233 - version = "0.1.40" 234 - source = "registry+https://github.com/rust-lang/crates.io-index" 235 - checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" 236 - dependencies = [ 237 - "pin-project-lite", 238 - "tracing-core", 239 - ] 240 - 241 - [[package]] 242 - name = "tracing-core" 243 - version = "0.1.32" 244 - source = "registry+https://github.com/rust-lang/crates.io-index" 245 - checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" 246 - dependencies = [ 247 - "once_cell", 248 - "valuable", 249 - ] 250 - 251 - [[package]] 252 - name = "tracing-log" 253 - version = "0.2.0" 254 - source = "registry+https://github.com/rust-lang/crates.io-index" 255 - checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" 256 - dependencies = [ 257 - "log", 258 - "once_cell", 259 - "tracing-core", 260 - ] 261 - 262 - [[package]] 263 - name = "tracing-subscriber" 264 - version = "0.3.18" 265 - source = "registry+https://github.com/rust-lang/crates.io-index" 266 - checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" 267 - dependencies = [ 268 - "matchers", 269 - "nu-ansi-term", 270 - "once_cell", 271 - "regex", 272 - "sharded-slab", 273 - "smallvec", 274 - "thread_local", 275 - "tracing", 276 - "tracing-core", 277 - "tracing-log", 278 - ] 279 - 280 - [[package]] 281 - name = "unicode-ident" 282 - version = "1.0.12" 283 - source = "registry+https://github.com/rust-lang/crates.io-index" 284 - checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 285 - 286 - [[package]] 287 - name = "valuable" 288 - version = "0.1.0" 289 - source = "registry+https://github.com/rust-lang/crates.io-index" 290 - checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" 291 - 292 - [[package]] 293 - name = "winapi" 294 - version = "0.3.9" 295 - source = "registry+https://github.com/rust-lang/crates.io-index" 296 - checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 297 - dependencies = [ 298 - "winapi-i686-pc-windows-gnu", 299 - "winapi-x86_64-pc-windows-gnu", 300 - ] 301 - 302 - [[package]] 303 - name = "winapi-i686-pc-windows-gnu" 304 - version = "0.4.0" 305 - source = "registry+https://github.com/rust-lang/crates.io-index" 306 - checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 307 - 308 - [[package]] 309 - name = "winapi-x86_64-pc-windows-gnu" 310 - version = "0.4.0" 311 - source = "registry+https://github.com/rust-lang/crates.io-index" 312 - checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 313 - 314 - [[package]] 315 - name = "windows" 316 - version = "0.58.0" 317 - source = "registry+https://github.com/rust-lang/crates.io-index" 318 - checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" 319 - dependencies = [ 320 - "windows-core", 321 - "windows-targets", 322 - ] 323 - 324 - [[package]] 325 - name = "windows-core" 326 - version = "0.58.0" 327 - source = "registry+https://github.com/rust-lang/crates.io-index" 328 - checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" 329 - dependencies = [ 330 - "windows-implement", 331 - "windows-interface", 332 - "windows-result", 333 - "windows-strings", 334 - "windows-targets", 335 - ] 336 - 337 - [[package]] 338 - name = "windows-implement" 339 - version = "0.58.0" 340 - source = "registry+https://github.com/rust-lang/crates.io-index" 341 - checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" 342 - dependencies = [ 343 - "proc-macro2", 344 - "quote", 345 - "syn", 346 - ] 347 - 348 - [[package]] 349 - name = "windows-interface" 350 - version = "0.58.0" 351 - source = "registry+https://github.com/rust-lang/crates.io-index" 352 - checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" 353 - dependencies = [ 354 - "proc-macro2", 355 - "quote", 356 - "syn", 357 - ] 358 - 359 - [[package]] 360 - name = "windows-result" 361 - version = "0.2.0" 362 - source = "registry+https://github.com/rust-lang/crates.io-index" 363 - checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" 364 - dependencies = [ 365 - "windows-targets", 366 - ] 367 - 368 - [[package]] 369 - name = "windows-strings" 370 - version = "0.1.0" 371 - source = "registry+https://github.com/rust-lang/crates.io-index" 372 - checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" 373 - dependencies = [ 374 - "windows-result", 375 - "windows-targets", 376 - ] 377 - 378 - [[package]] 379 - name = "windows-targets" 380 - version = "0.52.6" 381 - source = "registry+https://github.com/rust-lang/crates.io-index" 382 - checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 383 - dependencies = [ 384 - "windows_aarch64_gnullvm", 385 - "windows_aarch64_msvc", 386 - "windows_i686_gnu", 387 - "windows_i686_gnullvm", 388 - "windows_i686_msvc", 389 - "windows_x86_64_gnu", 390 - "windows_x86_64_gnullvm", 391 - "windows_x86_64_msvc", 392 - ] 393 - 394 - [[package]] 395 - name = "windows_aarch64_gnullvm" 396 - version = "0.52.6" 397 - source = "registry+https://github.com/rust-lang/crates.io-index" 398 - checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 399 - 400 - [[package]] 401 - name = "windows_aarch64_msvc" 402 - version = "0.52.6" 403 - source = "registry+https://github.com/rust-lang/crates.io-index" 404 - checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 405 - 406 - [[package]] 407 - name = "windows_i686_gnu" 408 - version = "0.52.6" 409 - source = "registry+https://github.com/rust-lang/crates.io-index" 410 - checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 411 - 412 - [[package]] 413 - name = "windows_i686_gnullvm" 414 - version = "0.52.6" 415 - source = "registry+https://github.com/rust-lang/crates.io-index" 416 - checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 417 - 418 - [[package]] 419 - name = "windows_i686_msvc" 420 - version = "0.52.6" 421 - source = "registry+https://github.com/rust-lang/crates.io-index" 422 - checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 423 - 424 - [[package]] 425 - name = "windows_x86_64_gnu" 426 - version = "0.52.6" 427 - source = "registry+https://github.com/rust-lang/crates.io-index" 428 - checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 429 - 430 - [[package]] 431 - name = "windows_x86_64_gnullvm" 432 - version = "0.52.6" 433 - source = "registry+https://github.com/rust-lang/crates.io-index" 434 - checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 435 - 436 - [[package]] 437 - name = "windows_x86_64_msvc" 438 - version = "0.52.6" 439 - source = "registry+https://github.com/rust-lang/crates.io-index" 440 - checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+2 -1
simple-left-right/Cargo.toml
··· 3 3 version = "0.1.0" 4 4 edition = "2021" 5 5 rust-version = "1.82" 6 + readme = "README.md" 6 7 authors = ["Lucas Baumann"] 7 8 keywords = ["real-time", "lock-free", "data-structures", "read-write", "concurrency"] 8 9 categories = ["concurrency"] 9 10 license = "MIT OR APACHE-2.0" 10 11 repository = "https://github.com/luca3s/tracker-engine" 11 - desciption = "Lockfree, realtime safe and copy-free Synchronisation" 12 + description = "Lockfree, realtime safe and copy-free Synchronisation" 12 13 workspace = "../" 13 14 14 15 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+4
simple-left-right/README.md
··· 1 + # Simple left right 2 + 3 + Simpler Version of [left-right](https://crates.io/crates/left-right), which only allows one reader. 4 + Also allows real-time safe read operations and is designed for this use-case.
+9 -1
tracker-engine/Cargo.toml
··· 2 2 name = "impulse-engine" 3 3 version = "0.1.0" 4 4 edition = "2021" 5 + authors = ["Lucas Baumann"] 5 6 rust-version = "1.82" 6 7 license = "GPL-2.0-only" # take a look again 8 + description = "Rewrite of Schismtracker" 9 + repository = "https://github.com/luca3s/tracker-engine" 10 + readme = "README.md" 11 + keywords = ["audio"] 12 + categories = ["audio"] 13 + 7 14 [dependencies] 8 15 basedrop = "0.1.2" # miri reports Race Condition. Wait for fix or pull inside 9 16 cpal = "0.15.3" 10 - futures = { version="0.3.30", default-features = false, features = ["std"]} 17 + rtrb = "0.3.1" 18 + # futures = { version="0.3.30", default-features = false, features = ["std"]} 11 19 # used for the Select API on channels, which is really useful 12 20 #flume = { version = "0.11.0", default-features = false, features = ["select"]} 13 21 simple-left-right = { path = "../simple-left-right" }
+1 -1
tracker-engine/src/lib.rs
··· 63 63 std::thread::sleep(Duration::from_secs(3)); 64 64 manager.play_note(note_event); 65 65 std::thread::sleep(Duration::from_secs(3)); 66 - while let Ok(event) = recv.try_next() { 66 + while let Ok(event) = recv.pop() { 67 67 println!("{event:?}"); 68 68 } 69 69 }
+4 -4
tracker-engine/src/live_audio.rs
··· 18 18 live_note: Option<SamplePlayer<'static, true>>, 19 19 manager: Receiver<ToWorkerMsg>, 20 20 audio_msg_config: AudioMsgConfig, 21 - to_app: futures::channel::mpsc::Sender<FromWorkerMsg>, 21 + to_app: rtrb::Producer<FromWorkerMsg>, 22 22 config: OutputConfig, 23 23 buffer: Box<[Frame]>, 24 24 } ··· 30 30 song: Reader<Song<true>>, 31 31 manager: Receiver<ToWorkerMsg>, 32 32 audio_msg_config: AudioMsgConfig, 33 - to_app: futures::channel::mpsc::Sender<FromWorkerMsg>, 33 + to_app: rtrb::Producer<FromWorkerMsg>, 34 34 config: OutputConfig, 35 35 ) -> Self { 36 36 Self { ··· 98 98 .for_each(|(buf, frame)| buf.add_assign(frame)); 99 99 100 100 if self.audio_msg_config.playback_position && position != playback.get_position() { 101 - let _ = self.to_app.try_send(FromWorkerMsg::CurrentPlaybackPosition(playback.get_position())); 101 + let _ = self.to_app.push(FromWorkerMsg::CurrentPlaybackPosition(playback.get_position())); 102 102 } 103 103 } 104 104 ··· 162 162 if self.audio_msg_config.buffer_finished { 163 163 let _ = self 164 164 .to_app 165 - .try_send(FromWorkerMsg::BufferFinished(info.timestamp())); 165 + .push(FromWorkerMsg::BufferFinished(info.timestamp())); 166 166 } 167 167 } 168 168 }
+2 -2
tracker-engine/src/manager/audio_manager.rs
··· 70 70 config: OutputConfig, 71 71 audio_msg_config: AudioMsgConfig, 72 72 msg_buffer_size: usize, 73 - ) -> Result<futures::channel::mpsc::Receiver<FromWorkerMsg>, cpal::BuildStreamError> { 74 - let from_worker = futures::channel::mpsc::channel(msg_buffer_size); 73 + ) -> Result<rtrb::Consumer<FromWorkerMsg>, cpal::BuildStreamError> { 74 + let from_worker = rtrb::RingBuffer::new(msg_buffer_size); 75 75 let to_worker = std::sync::mpsc::channel(); 76 76 let reader = self.song.build_reader().unwrap(); 77 77