├── LICENSE ├── README.md └── Source ├── .gitattributes ├── .gitignore ├── BaseWindow.cpp ├── COMPLIMENT.cpp ├── ConsoleApplication16.rc ├── ConsoleApplication16.sln ├── ConsoleApplication16.vcxproj ├── ConsoleApplication16.vcxproj.filters ├── ConsoleApplication16.vcxproj.user ├── Emulate.cpp ├── LICENSE.txt ├── LoveInQuest.h ├── MENUMAKER.cpp ├── MIXWIN.cpp ├── MixOS.exe ├── MixOS_API.cpp ├── MixOS_API.h ├── Names.h ├── PIANO.cpp ├── PLD.cpp ├── Player.cpp ├── Player.h ├── Player.sln ├── Player.vcxproj ├── QUEST.cpp ├── README.md ├── Sonic.png ├── Sourc33.cpp ├── Source.cpp ├── Source1.cpp ├── TERMINAL.cpp ├── UAMENU.cpp ├── Win98SE_rus_P133.cfg ├── Win98SE_rus_P133.img ├── Youtube.cpp ├── bass.dll ├── bass.h ├── bass ├── 1.cpp ├── c │ ├── 3dtest │ │ ├── 3dtest.c │ │ ├── 3dtest.rc │ │ ├── 3dtest.vcxproj │ │ └── makefile │ ├── bass.h │ ├── bass.lib │ ├── bass.sln │ ├── basstest │ │ ├── basstest.c │ │ ├── basstest.rc │ │ ├── basstest.vcxproj │ │ └── makefile │ ├── bin │ │ ├── 3dtest.exe │ │ ├── basstest.exe │ │ ├── contest.exe │ │ ├── custloop.exe │ │ ├── devlist.exe │ │ ├── dsptest.exe │ │ ├── fxtest.exe │ │ ├── livefx.exe │ │ ├── livespec.exe │ │ ├── modtest.exe │ │ ├── multi.exe │ │ ├── netradio.exe │ │ ├── plugins.exe │ │ ├── rectest.exe │ │ ├── speakers.exe │ │ ├── spectrum.exe │ │ ├── synth.exe │ │ └── writewav.exe │ ├── contest │ │ ├── contest.c │ │ ├── contest.vcxproj │ │ └── makefile │ ├── custloop │ │ ├── custloop.c │ │ ├── custloop.vcxproj │ │ └── makefile │ ├── devlist │ │ ├── devlist.c │ │ ├── devlist.vcxproj │ │ └── makefile │ ├── dsptest │ │ ├── dsptest.c │ │ ├── dsptest.rc │ │ ├── dsptest.vcxproj │ │ └── makefile │ ├── fxtest │ │ ├── fxtest.c │ │ ├── fxtest.rc │ │ ├── fxtest.vcxproj │ │ └── makefile │ ├── livefx │ │ ├── livefx.c │ │ ├── livefx.rc │ │ ├── livefx.vcxproj │ │ └── makefile │ ├── livespec │ │ ├── livespec.c │ │ ├── livespec.vcxproj │ │ └── makefile │ ├── makefile │ ├── makefile.in │ ├── modtest │ │ ├── makefile │ │ ├── modtest.c │ │ ├── modtest.rc │ │ └── modtest.vcxproj │ ├── multi │ │ ├── makefile │ │ ├── multi.c │ │ ├── multi.rc │ │ └── multi.vcxproj │ ├── netradio │ │ ├── makefile │ │ ├── netradio.c │ │ ├── netradio.rc │ │ └── netradio.vcxproj │ ├── plugins │ │ ├── makefile │ │ ├── plugins.c │ │ ├── plugins.rc │ │ └── plugins.vcxproj │ ├── rectest │ │ ├── makefile │ │ ├── rectest.c │ │ ├── rectest.rc │ │ └── rectest.vcxproj │ ├── speakers │ │ ├── makefile │ │ ├── speakers.c │ │ ├── speakers.rc │ │ └── speakers.vcxproj │ ├── spectrum │ │ ├── makefile │ │ ├── spectrum.c │ │ └── spectrum.vcxproj │ ├── synth │ │ ├── makefile │ │ ├── synth.c │ │ └── synth.vcxproj │ ├── writewav │ │ ├── makefile │ │ ├── writewav.c │ │ └── writewav.vcxproj │ └── x64 │ │ └── bass.lib └── x64 │ └── bass.dll ├── example.cpp ├── framework.h ├── names2.h ├── player.cpp ├── player.sln ├── player.vcxproj ├── player.vcxproj.user ├── resource.h ├── resource1.h ├── resource2.h ├── resource3.h ├── resource4.h ├── resource5.h ├── resource6.h ├── stderr.txt ├── stdout.txt ├── targetver.h └── вапвап1.cpp /README.md: -------------------------------------------------------------------------------- 1 | # MixOS 2 | 3 | MixOS 4 | 5 | 6 | This is my the first project. It is a music player. But not only a player. Player uses bass.dll, win32API. And now you can spend a time for playing games which contains 7 | my player. Such as Terminal, Piano, "Shashnahme Quest". And so much interesting things, such as playing games by different emulators. 8 | 9 | The first of all. This is program for Windows VISTA-11. On linux you must to install WINE. 10 | 11 | What functions does have my player? 12 | Well 13 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/478f612b-ccd2-49cb-aadb-31e5470c2ce6) 14 | 15 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/d5275aa1-0aea-4ffc-883c-5f0c67bc8d42) 16 | 17 | 18 | This is standart color. But you can change colos and skins. 19 | ![изображение](https://user-images.githubusercontent.com/47190179/182655724-e270906b-7ef4-4d75-96b6-e61881d0bf07.png) 20 | 21 | 22 | INTERESTING THINGS: 23 | 24 | 25 | Menu "Шашнахме". You won't understand what does it mean. This is local meme. It translate on english such as "to get confuse" 26 | 27 | But im my player this menu includs Terminal. Piano, "Shashnahme QUEST" (to get confused QUEST), Converter of Currency 28 | 29 | QUEST 30 | ![изображение](https://user-images.githubusercontent.com/47190179/182655965-e5a6aca4-faa5-43fc-ac82-873d659dffde.png) 31 | ![изображение](https://user-images.githubusercontent.com/47190179/182655986-4369e354-e239-4119-9603-e7275dce863e.png) 32 | ![изображение](https://user-images.githubusercontent.com/47190179/182656105-715b5c78-213c-4b46-af02-9f8eeb86c86c.png) 33 | 34 | PIANO 35 | ![изображение](https://user-images.githubusercontent.com/47190179/182656144-f4b57123-8d6f-4ac6-9527-4a5e6501dc00.png) 36 | 37 | TERMINAL 38 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/29ed3d0c-d567-42f1-b65a-b44440ac0f7b) 39 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/2519b2c7-e6a3-4c8e-9461-e0a968387680) 40 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/ccad0417-47b2-45b5-b16c-172761b92d96) 41 | 42 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/4967b305-8a8c-4b40-be63-e71679d9f240) 43 | 44 | 45 | The List Of Emulators 46 | 47 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/e8cb78b6-1616-4fbd-8eaa-937279823b22) 48 | 49 | And there is a bug with text =) 50 | 51 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/6c5e3c63-2e97-4a3b-aa70-c8ae54dc21f4) 52 | 53 | but... it just beautiful!!! 54 | 55 | 56 | 57 | 58 | Youtube video downloader 59 | 60 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/33ce981f-b7ba-4a18-a5ff-dfb1cf805597) 61 | 62 | Such as other programs. U can write your questions by clicking on button "Написать разработчику" 63 | 64 | MENUMAKER 65 | 66 | ![изображение](https://user-images.githubusercontent.com/47190179/182656535-92ec1874-9880-472b-918c-32f137759fc9.png) 67 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/90df852b-cea6-4eac-aff8-e00dd5254a9a) 68 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/821ef90a-23bf-4e1c-9a24-f1295fa5a556) 69 | 70 | 71 | And so much intereshing things!!! 72 | 73 | TERMINAL CONTAINS MORE THAN 50 EASTER EGGS! 74 | 75 | Menu "Системные утилиты" (System Utilities). It contains the most important system utilites for my mean. Such as Regedit, Resmon, e.t.c 76 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/085efcdd-e996-4ed0-94e6-4ad729fd2402) 77 | 78 | 79 | Menu "Установка полезного софта" (Installing useful software). 80 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/d14f0616-ffe5-4bf9-bb4f-980af51b4f0e) 81 | 82 | It contains: 83 | VISUAL C++ REDISTRIBUTABLE 2005-2022. You can to reinstall or install it on your system. 84 | Visual studio 2022. Community version. 85 | OBS STUDIO. 86 | CPU-Z 87 | HW-MONITOR 88 | 89 | You can install this programs!! 90 | 91 | Menu "Развлечения" (Entertainment) contains the most useful function on this player 92 | 93 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/c1c9e1d9-37c4-42aa-a939-4133d5ad29c8) 94 | 95 | 96 | 97 | 98 | You can change color and skins too. 99 | 100 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/65096ebc-1c36-4744-b46f-e856898b5edf) 101 | 102 | 103 | 104 | In "Список эмуляторов" u can try to use new functon =). It names "Сборник ОС" (Mix of Windows =)) 105 | 106 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/4d83439a-ed20-4fa3-ab8a-5b50fe09d308) 107 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/eb72760a-d990-45dc-a1ed-fc4c4f733313) 108 | 109 | Yju can install and use all operating systems from Microsoft! 110 | And every system contains some easter eggs! 111 | For example. What do u think about this? 112 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/953a3f58-799d-4a40-a19a-4434424644f3) 113 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/2eccca72-b285-499f-a861-25ce48010b22) 114 | 115 | In thit entertainment menu u can choose any emulator and console what u want). 116 | 117 | And the last interesting thing is a menu for my favourite computer's game =). 118 | 119 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/cfc7ade1-da40-4b8b-a729-b9cbe27699b9) 120 | 121 | In this menu u can play in original game. And play in modified version =). For example - UA DOMINATION 122 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/c6beeb66-87ce-4dcc-8574-b05003ed3744) 123 | 124 | 125 | ![image](https://github.com/CaptainStrannik/MixOS/assets/47190179/d3ce235e-8954-4a9c-aee9-00d89e9bfce0) 126 | 127 | 128 | 129 | Maybe this all. You can find all easter eggs when try to research this =) 130 | 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /Source/.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /Source/.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd -------------------------------------------------------------------------------- /Source/BaseWindow.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/BaseWindow.cpp -------------------------------------------------------------------------------- /Source/COMPLIMENT.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/COMPLIMENT.cpp -------------------------------------------------------------------------------- /Source/ConsoleApplication16.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/ConsoleApplication16.rc -------------------------------------------------------------------------------- /Source/ConsoleApplication16.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.0.32112.339 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConsoleApplication16", "ConsoleApplication16.vcxproj", "{3C1C739C-6B65-4CAD-8140-41DBB27958CB}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|ARM = Debug|ARM 11 | Debug|Win32 = Debug|Win32 12 | Debug|x64 = Debug|x64 13 | Debug|x86 = Debug|x86 14 | Release|ARM = Release|ARM 15 | Release|Win32 = Release|Win32 16 | Release|x64 = Release|x64 17 | Release|x86 = Release|x86 18 | ло|ARM = ло|ARM 19 | ло|Win32 = ло|Win32 20 | ло|x64 = ло|x64 21 | ло|x86 = ло|x86 22 | Ыекфттшл|ARM = Ыекфттшл|ARM 23 | Ыекфттшл|Win32 = Ыекфттшл|Win32 24 | Ыекфттшл|x64 = Ыекфттшл|x64 25 | Ыекфттшл|x86 = Ыекфттшл|x86 26 | EndGlobalSection 27 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 28 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Debug|ARM.ActiveCfg = Debug|ARM 29 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Debug|ARM.Build.0 = Debug|ARM 30 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Debug|Win32.ActiveCfg = Debug|Win32 31 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Debug|Win32.Build.0 = Debug|Win32 32 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Debug|x64.ActiveCfg = Debug|x64 33 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Debug|x86.ActiveCfg = Debug|x64 34 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|ARM.ActiveCfg = Release|x64 35 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|ARM.Build.0 = Release|x64 36 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|Win32.ActiveCfg = Release|Win32 37 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|Win32.Build.0 = Release|Win32 38 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|x64.ActiveCfg = Release|x64 39 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|x64.Build.0 = Release|x64 40 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|x86.ActiveCfg = Release|x64 41 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|x86.Build.0 = Release|x64 42 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.ло|ARM.ActiveCfg = ло|ARM 43 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.ло|ARM.Build.0 = ло|ARM 44 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.ло|Win32.ActiveCfg = ло|Win32 45 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.ло|Win32.Build.0 = ло|Win32 46 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.ло|x64.ActiveCfg = ло|x64 47 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.ло|x86.ActiveCfg = ло|x64 48 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Ыекфттшл|ARM.ActiveCfg = Ыекфттшл|ARM 49 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Ыекфттшл|ARM.Build.0 = Ыекфттшл|ARM 50 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Ыекфттшл|Win32.ActiveCfg = Ыекфттшл|Win32 51 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Ыекфттшл|Win32.Build.0 = Ыекфттшл|Win32 52 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Ыекфттшл|x64.ActiveCfg = Ыекфттшл|x64 53 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Ыекфттшл|x86.ActiveCfg = Ыекфттшл|x64 54 | EndGlobalSection 55 | GlobalSection(SolutionProperties) = preSolution 56 | HideSolutionNode = FALSE 57 | EndGlobalSection 58 | GlobalSection(ExtensibilityGlobals) = postSolution 59 | SolutionGuid = {855BEB3E-E8BE-46DE-A243-D81F7CCD086F} 60 | EndGlobalSection 61 | EndGlobal 62 | -------------------------------------------------------------------------------- /Source/ConsoleApplication16.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Исходные файлы 20 | 21 | 22 | Исходные файлы 23 | 24 | 25 | Исходные файлы 26 | 27 | 28 | Исходные файлы 29 | 30 | 31 | Исходные файлы 32 | 33 | 34 | Исходные файлы 35 | 36 | 37 | Исходные файлы 38 | 39 | 40 | Исходные файлы 41 | 42 | 43 | Исходные файлы 44 | 45 | 46 | Исходные файлы 47 | 48 | 49 | Исходные файлы 50 | 51 | 52 | Исходные файлы 53 | 54 | 55 | Исходные файлы 56 | 57 | 58 | Исходные файлы 59 | 60 | 61 | 62 | 63 | Файлы заголовков 64 | 65 | 66 | Файлы заголовков 67 | 68 | 69 | Файлы заголовков 70 | 71 | 72 | Файлы заголовков 73 | 74 | 75 | Файлы заголовков 76 | 77 | 78 | Файлы заголовков 79 | 80 | 81 | Файлы заголовков 82 | 83 | 84 | Файлы заголовков 85 | 86 | 87 | Исходные файлы 88 | 89 | 90 | Файлы заголовков 91 | 92 | 93 | Файлы заголовков 94 | 95 | 96 | Файлы заголовков 97 | 98 | 99 | Исходные файлы 100 | 101 | 102 | Файлы заголовков 103 | 104 | 105 | 106 | 107 | Файлы ресурсов 108 | 109 | 110 | 111 | 112 | Файлы ресурсов 113 | 114 | 115 | Файлы ресурсов 116 | 117 | 118 | Файлы ресурсов 119 | 120 | 121 | Файлы ресурсов 122 | 123 | 124 | 125 | 126 | Файлы ресурсов 127 | 128 | 129 | -------------------------------------------------------------------------------- /Source/ConsoleApplication16.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WindowsLocalDebugger 5 | 6 | -------------------------------------------------------------------------------- /Source/Emulate.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/Emulate.cpp -------------------------------------------------------------------------------- /Source/LoveInQuest.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | #define LOVING1 1 5 | #define LOVING2 2 6 | #define LOVING3 3 -------------------------------------------------------------------------------- /Source/MENUMAKER.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/MENUMAKER.cpp -------------------------------------------------------------------------------- /Source/MIXWIN.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/MIXWIN.cpp -------------------------------------------------------------------------------- /Source/MixOS.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/MixOS.exe -------------------------------------------------------------------------------- /Source/MixOS_API.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/MixOS_API.cpp -------------------------------------------------------------------------------- /Source/MixOS_API.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "resource.h" 6 | #include "Names.h" 7 | 8 | #define MIXOS_VER "Beta 2.5" 9 | #define MP_VER MIXOS_VER 10 | //#define TERMINAL_VER "Beta 1.2" 11 | //#define PIANO_VER "Beta 1.1" 12 | //#define EMULATE_VER "Beta 2.0" 13 | //#define YOUTUBE_VER "Beta 1.1" 14 | //#define MENUMAKER_VER "Beta 1.0" 15 | 16 | #define TYPE_MIXOS_HWND 0x00 17 | #define TYPE_MP_HWND TYPE_MIXOS_HWND 18 | //#define TYPE_TERMINAL_HWND 1 19 | //#define TYPE_PIANO_HWND 2 20 | //#define TYPE_EMULATE_HWND 3 21 | //#define TYPE_YOUTUBE_HWND 4 22 | //#define TYPE_MENUMAKER_HWND 5 23 | 24 | #define TYPE_COMP_MIXOS_VER 0x10 25 | #define TYPE_COMP_MP_VER 26 | 27 | LPVOID MixGetInfo(BYTE cType, LPCVOID lpcvData); 28 | BOOL MixSendInfo(BYTE cType, LPCVOID lpcvData); -------------------------------------------------------------------------------- /Source/PIANO.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/PIANO.cpp -------------------------------------------------------------------------------- /Source/PLD.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/PLD.cpp -------------------------------------------------------------------------------- /Source/Player.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | -------------------------------------------------------------------------------- /Source/Player.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30621.155 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConsoleApplication16", "ConsoleApplication16.vcxproj", "{3C1C739C-6B65-4CAD-8140-41DBB27958CB}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Debug|x64.ActiveCfg = Debug|x64 17 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Debug|x64.Build.0 = Debug|x64 18 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Debug|x86.ActiveCfg = Debug|Win32 19 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Debug|x86.Build.0 = Debug|Win32 20 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|x64.ActiveCfg = Release|x64 21 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|x64.Build.0 = Release|x64 22 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|x86.ActiveCfg = Release|Win32 23 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {855BEB3E-E8BE-46DE-A243-D81F7CCD086F} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Source/QUEST.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/QUEST.cpp -------------------------------------------------------------------------------- /Source/README.md: -------------------------------------------------------------------------------- 1 | # Source -------------------------------------------------------------------------------- /Source/Sonic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/Sonic.png -------------------------------------------------------------------------------- /Source/Sourc33.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/Sourc33.cpp -------------------------------------------------------------------------------- /Source/Source.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/Source.cpp -------------------------------------------------------------------------------- /Source/Source1.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Source/TERMINAL.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/TERMINAL.cpp -------------------------------------------------------------------------------- /Source/UAMENU.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/UAMENU.cpp -------------------------------------------------------------------------------- /Source/Win98SE_rus_P133.cfg: -------------------------------------------------------------------------------- 1 | gameblaster = 0 2 | gus = 0 3 | ssi2001 = 0 4 | voodoo = 0 5 | model = amixt 6 | cpu_manufacturer = 0 7 | cpu = 0 8 | cpu_use_dynarec = 0 9 | cpu_waitstates = 0 10 | gfxcard = cga 11 | video_speed = -1 12 | sndcard = none 13 | cpu_speed = 0 14 | has_fpu = 0 15 | disc_a = 16 | disc_b = 17 | hdd_controller = 18 | mem_size = 4096 19 | cdrom_drive = 0 20 | cdrom_channel = 2 21 | cdrom_path = 22 | zip_channel = -1 23 | hdc_sectors = 0 24 | hdc_heads = 0 25 | hdc_cylinders = 0 26 | hdc_fn = 27 | hdd_sectors = 0 28 | hdd_heads = 0 29 | hdd_cylinders = 0 30 | hdd_fn = 31 | hde_sectors = 0 32 | hde_heads = 0 33 | hde_cylinders = 0 34 | hde_fn = 35 | hdf_sectors = 0 36 | hdf_heads = 0 37 | hdf_cylinders = 0 38 | hdf_fn = 39 | hdg_sectors = 0 40 | hdg_heads = 0 41 | hdg_cylinders = 0 42 | hdg_fn = 43 | hdh_sectors = 0 44 | hdh_heads = 0 45 | hdh_cylinders = 0 46 | hdh_fn = 47 | hdi_sectors = 0 48 | hdi_heads = 0 49 | hdi_cylinders = 0 50 | hdi_fn = 51 | drive_a_type = 7 52 | drive_b_type = 7 53 | bpb_disable = 0 54 | cd_speed = 24 55 | joystick_type = 0 56 | mouse_type = 0 57 | enable_sync = 1 58 | netcard = 59 | lpt1_device = 60 | vid_resize = 0 61 | video_fullscreen_scale = 0 62 | video_fullscreen_first = 1 63 | 64 | [Joysticks] 65 | joystick_0_nr = 0 66 | joystick_1_nr = 0 67 | 68 | [SDL2] 69 | screenshot_format = png 70 | screenshot_flash = 1 71 | custom_width = 640 72 | custom_height = 480 73 | fullscreen = 0 74 | fullscreen_mode = 0 75 | scale = 1 76 | scale_mode = 1 77 | vsync = 0 78 | focus_dim = 0 79 | alternative_update_lock = 0 80 | render_driver = software 81 | 82 | [GL3] 83 | input_scale = 1.000000 84 | input_stretch = 0 85 | shader_refresh_rate = 0.000000 86 | 87 | [GL3 Shaders] 88 | shaders = 0 89 | -------------------------------------------------------------------------------- /Source/Win98SE_rus_P133.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/Win98SE_rus_P133.img -------------------------------------------------------------------------------- /Source/Youtube.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/Youtube.cpp -------------------------------------------------------------------------------- /Source/bass.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass.dll -------------------------------------------------------------------------------- /Source/bass/1.cpp: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Source/bass/c/3dtest/3dtest.c: -------------------------------------------------------------------------------- 1 | /* 2 | BASS 3D test 3 | Copyright (c) 1999-2017 Un4seen Developments Ltd. 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "bass.h" 11 | 12 | HWND win; 13 | 14 | // channel (sample/music) info structure 15 | typedef struct { 16 | DWORD channel; // channel handle 17 | BASS_3DVECTOR pos, vel; // position, velocity 18 | } Channel; 19 | 20 | Channel *chans; // the channels 21 | int chanc; // number of channels 22 | int chan = -1; // selected channel 23 | 24 | #define TIMERPERIOD 50 // timer period (ms) 25 | #define MAXDIST 50 // maximum distance of the channels (m) 26 | #define SPEED 12 // speed of the channels' movement (m/s) 27 | 28 | // Display error dialogs 29 | void Error(const char *es) 30 | { 31 | char mes[200]; 32 | sprintf(mes, "%s\n(error code: %d)", es, BASS_ErrorGetCode()); 33 | MessageBox(win, mes, 0, 0); 34 | } 35 | 36 | // Messaging macros 37 | #define ITEM(id) GetDlgItem(win,id) 38 | #define MESS(id,m,w,l) SendDlgItemMessage(win,id,m,(WPARAM)(w),(LPARAM)(l)) 39 | #define LM(m,w,l) MESS(10,m,w,l) 40 | 41 | void UpdateDisplay() 42 | { 43 | HDC dc; 44 | RECT r; 45 | int c, x, y, cx, cy; 46 | HBRUSH red = CreateSolidBrush(0xff); 47 | 48 | HWND w = ITEM(30); 49 | dc = GetDC(w); 50 | GetClientRect(w, &r); 51 | cx = r.right / 2; 52 | cy = r.bottom / 2; 53 | 54 | // clear the display 55 | FillRect(dc, &r, (HBRUSH)GetStockObject(WHITE_BRUSH)); 56 | 57 | // Draw the listener 58 | SelectObject(dc, GetStockObject(GRAY_BRUSH)); 59 | Ellipse(dc, cx - 4, cy - 4, cx + 4, cy + 4); 60 | 61 | for (c = 0; c < chanc; c++) { 62 | // If the channel's playing then update it's position 63 | if (BASS_ChannelIsActive(chans[c].channel) == BASS_ACTIVE_PLAYING) { 64 | // Check if channel has reached the max distance 65 | if (chans[c].pos.z >= MAXDIST || chans[c].pos.z <= -MAXDIST) 66 | chans[c].vel.z = -chans[c].vel.z; 67 | if (chans[c].pos.x >= MAXDIST || chans[c].pos.x <= -MAXDIST) 68 | chans[c].vel.x = -chans[c].vel.x; 69 | // Update channel position 70 | chans[c].pos.z += chans[c].vel.z * TIMERPERIOD / 1000; 71 | chans[c].pos.x += chans[c].vel.x * TIMERPERIOD / 1000; 72 | BASS_ChannelSet3DPosition(chans[c].channel, &chans[c].pos, NULL, &chans[c].vel); 73 | } 74 | // Draw the channel position indicator 75 | x = cx + (int)((cx - 10) * chans[c].pos.x / MAXDIST); 76 | y = cy - (int)((cy - 10) * chans[c].pos.z / MAXDIST); 77 | SelectObject(dc, chan == c ? red : GetStockObject(WHITE_BRUSH)); 78 | Ellipse(dc, x - 4, y - 4, x + 4, y + 4); 79 | } 80 | // Apply the 3D changes 81 | BASS_Apply3D(); 82 | 83 | ReleaseDC(w, dc); 84 | DeleteObject(red); 85 | } 86 | 87 | // Update the button states 88 | void UpdateButtons() 89 | { 90 | int a; 91 | for (a = 12; a <= 17; a++) 92 | EnableWindow(ITEM(a), chan == -1 ? FALSE : TRUE); 93 | if (chan != -1) { 94 | SetDlgItemInt(win, 15, abs((int)chans[chan].vel.x), FALSE); 95 | SetDlgItemInt(win, 16, abs((int)chans[chan].vel.z), FALSE); 96 | } 97 | } 98 | 99 | INT_PTR CALLBACK DialogProc(HWND h, UINT m, WPARAM w, LPARAM l) 100 | { 101 | static OPENFILENAME ofn; 102 | 103 | switch (m) { 104 | case WM_TIMER: 105 | UpdateDisplay(); 106 | break; 107 | 108 | case WM_COMMAND: 109 | switch (LOWORD(w)) { 110 | case 10: // change the selected channel 111 | if (HIWORD(w) != LBN_SELCHANGE) break; 112 | chan = LM(LB_GETCURSEL, 0, 0); 113 | UpdateButtons(); 114 | break; 115 | 116 | case 11: // add a channel 117 | { 118 | char file[MAX_PATH] = ""; 119 | ofn.lpstrFile = file; 120 | if (GetOpenFileName(&ofn)) { 121 | DWORD newchan; 122 | if ((newchan = BASS_MusicLoad(FALSE, file, 0, 0, BASS_MUSIC_RAMP | BASS_SAMPLE_LOOP | BASS_SAMPLE_3D, 1)) 123 | || (newchan = BASS_SampleLoad(FALSE, file, 0, 0, 1, BASS_SAMPLE_LOOP | BASS_SAMPLE_3D | BASS_SAMPLE_MONO))) { 124 | Channel *c; 125 | chanc++; 126 | chans = (Channel*)realloc((void*)chans, chanc * sizeof(Channel)); 127 | c = chans + chanc - 1; 128 | memset(c, 0, sizeof(Channel)); 129 | c->channel = newchan; 130 | BASS_SampleGetChannel(newchan, FALSE); // initialize sample channel (ignored if MOD music) 131 | LM(LB_ADDSTRING, 0, strrchr(file, '\\') + 1); 132 | } else 133 | Error("Can't load the file"); 134 | } 135 | } 136 | break; 137 | 138 | case 12: // remove a channel 139 | { 140 | Channel *c = chans + chan; 141 | BASS_SampleFree(c->channel); 142 | BASS_MusicFree(c->channel); 143 | memmove(c, c + 1, (chanc - chan - 1) * sizeof(Channel)); 144 | chanc--; 145 | LM(LB_DELETESTRING, chan, 0); 146 | chan = -1; 147 | UpdateButtons(); 148 | } 149 | break; 150 | 151 | case 13: 152 | BASS_ChannelPlay(chans[chan].channel, FALSE); 153 | break; 154 | 155 | case 14: 156 | BASS_ChannelPause(chans[chan].channel); 157 | break; 158 | 159 | case 15: // X velocity 160 | if (HIWORD(w) == EN_CHANGE) { 161 | int v = GetDlgItemInt(win, 15, 0, FALSE); 162 | if (abs((int)chans[chan].vel.x) != v) chans[chan].vel.x = v; 163 | } 164 | break; 165 | 166 | case 16: // Z velocity 167 | if (HIWORD(w) == EN_CHANGE) { 168 | int v = GetDlgItemInt(win, 16, 0, FALSE); 169 | if (abs((int)chans[chan].vel.z) != v) chans[chan].vel.z = v; 170 | } 171 | break; 172 | 173 | case 17: // reset the position and velocity to 0 174 | memset(&chans[chan].pos, 0, sizeof(chans[chan].pos)); 175 | memset(&chans[chan].vel, 0, sizeof(chans[chan].vel)); 176 | UpdateButtons(); 177 | break; 178 | 179 | case IDCANCEL: 180 | DestroyWindow(h); 181 | break; 182 | } 183 | break; 184 | 185 | case WM_HSCROLL: 186 | if (l) { 187 | int pos = SendMessage((HWND)l, TBM_GETPOS, 0, 0); 188 | switch (GetDlgCtrlID((HWND)l)) { 189 | case 20: // change the rolloff factor 190 | BASS_Set3DFactors(-1, pow(2, (pos - 10) / 5.0), -1); 191 | break; 192 | case 21: // change the doppler factor 193 | BASS_Set3DFactors(-1, -1, pow(2, (pos - 10) / 5.0)); 194 | break; 195 | } 196 | } 197 | break; 198 | 199 | case WM_INITDIALOG: 200 | win = h; 201 | // initialize default output device 202 | if (!BASS_Init(-1, 44100, 0, win, NULL)) { 203 | Error("Can't initialize device"); 204 | EndDialog(win, 0); 205 | return 0; 206 | } 207 | { // check if multiple speakers are available 208 | BASS_INFO i; 209 | BASS_GetInfo(&i); 210 | if (i.speakers > 2) { 211 | if (MessageBox(win, "Multiple speakers were detected. Would you like to use them?", "Speakers", MB_YESNO) == IDNO) 212 | BASS_SetConfig(BASS_CONFIG_3DALGORITHM, BASS_3DALG_OFF); // use stereo 3D output 213 | } 214 | } 215 | // use meters as distance unit, real world rolloff, real doppler effect 216 | BASS_Set3DFactors(1, 1, 1); 217 | MESS(20, TBM_SETRANGE, FALSE, MAKELONG(0, 20)); 218 | MESS(20, TBM_SETPOS, TRUE, 10); 219 | MESS(21, TBM_SETRANGE, FALSE, MAKELONG(0, 20)); 220 | MESS(21, TBM_SETPOS, TRUE, 10); 221 | SetTimer(h, 1, TIMERPERIOD, NULL); 222 | memset(&ofn, 0, sizeof(ofn)); 223 | ofn.lStructSize = sizeof(ofn); 224 | ofn.hwndOwner = h; 225 | ofn.nMaxFile = MAX_PATH; 226 | ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER; 227 | ofn.lpstrFilter = "wav/aif/mo3/xm/mod/s3m/it/mtm/umx\0*.wav;*.aif;*.mo3;*.xm;*.mod;*.s3m;*.it;*.mtm;*.umx\0" 228 | "All files\0*.*\0\0"; 229 | return 1; 230 | 231 | case WM_DESTROY: 232 | KillTimer(h, 1); 233 | free(chans); 234 | BASS_Free(); 235 | break; 236 | } 237 | 238 | return 0; 239 | } 240 | 241 | int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 242 | { 243 | MSG msg; 244 | 245 | // check the correct BASS was loaded 246 | if (HIWORD(BASS_GetVersion()) != BASSVERSION) { 247 | MessageBox(0, "An incorrect version of BASS.DLL was loaded", 0, MB_ICONERROR); 248 | return 0; 249 | } 250 | 251 | { 252 | INITCOMMONCONTROLSEX cc = { sizeof(cc), ICC_BAR_CLASSES }; 253 | InitCommonControlsEx(&cc); 254 | } 255 | 256 | DialogBox(hInstance, MAKEINTRESOURCE(1000), NULL, DialogProc); 257 | 258 | return 0; 259 | } 260 | -------------------------------------------------------------------------------- /Source/bass/c/3dtest/3dtest.rc: -------------------------------------------------------------------------------- 1 | #include "windows.h" 2 | 3 | 1000 DIALOG DISCARDABLE 100, 100, 255, 141 4 | STYLE WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU 5 | CAPTION "BASS 3D test" 6 | FONT 8, "MS Sans Serif" 7 | BEGIN 8 | GROUPBOX "Channels",-1,5,0,120,111 9 | LISTBOX 10,10,9,110,35,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | 10 | WS_TABSTOP 11 | PUSHBUTTON "Add...",11,12,49,50,12 12 | PUSHBUTTON "Remove",12,68,49,50,12,WS_DISABLED 13 | PUSHBUTTON "Play",13,12,65,50,12,WS_DISABLED 14 | PUSHBUTTON "Stop",14,68,65,50,12,WS_DISABLED 15 | GROUPBOX "Movement",-1,5,80,120,31 16 | LTEXT "x:",-1,12,93,8,8 17 | EDITTEXT 15,21,91,20,13,ES_NUMBER | WS_DISABLED 18 | LTEXT "z:",-1,50,93,8,8 19 | EDITTEXT 16,59,91,20,13,ES_NUMBER | WS_DISABLED 20 | PUSHBUTTON "reset",17,88,91,30,12,WS_DISABLED 21 | GROUPBOX "Rolloff factor",-1,5,113,120,23 22 | CONTROL "",20,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | 23 | WS_TABSTOP,15,123,100,10 24 | GROUPBOX "Doppler factor",-1,130,113,120,23 25 | CONTROL "",21,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | 26 | WS_TABSTOP,140,123,100,10 27 | GROUPBOX "",-1,130,0,120,111 28 | LTEXT "",30,135,9,109,96,SS_SUNKEN 29 | END 30 | -------------------------------------------------------------------------------- /Source/bass/c/3dtest/3dtest.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {98CE30EE-9892-4896-9A68-34725FB454B8} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;comctl32.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Windows 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;comctl32.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Windows 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Source/bass/c/3dtest/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = 3dtest.exe 4 | FLAGS += -mwindows 5 | LIBS += -lcomdlg32 -lcomctl32 -lgdi32 6 | 7 | all: $(TARGET) 8 | 9 | clean: 10 | $(RM) $(OUTDIR)\$(TARGET) 11 | -------------------------------------------------------------------------------- /Source/bass/c/bass.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bass.lib -------------------------------------------------------------------------------- /Source/bass/c/basstest/basstest.rc: -------------------------------------------------------------------------------- 1 | #include "windows.h" 2 | 3 | 1000 DIALOG DISCARDABLE 100, 100, 350, 130 4 | STYLE WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU 5 | CAPTION "BASS simple playback test" 6 | FONT 8, "MS Sans Serif" 7 | BEGIN 8 | GROUPBOX "Stream",-1,5,0,110,107 9 | LISTBOX 10,10,10,100,35,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | 10 | WS_TABSTOP 11 | PUSHBUTTON "Play",11,10,50,30,12 12 | PUSHBUTTON "Stop",12,45,50,30,12 13 | PUSHBUTTON "Restart",13,80,50,30,12 14 | PUSHBUTTON "Add...",14,10,65,48,16 15 | PUSHBUTTON "Remove",15,62,65,48,16 16 | LTEXT "global volume:",-1,10,83,46,8 17 | CONTROL "Slider1",16,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | 18 | WS_TABSTOP,10,92,100,11 19 | GROUPBOX "MOD Music",-1,120,0,110,107 20 | LISTBOX 20,125,10,100,35,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | 21 | WS_TABSTOP 22 | PUSHBUTTON "Play",21,125,50,30,12 23 | PUSHBUTTON "Stop",22,160,50,30,12 24 | PUSHBUTTON "Restart",23,195,50,30,12 25 | PUSHBUTTON "Add...",24,125,65,48,16 26 | PUSHBUTTON "Remove",25,177,65,48,16 27 | LTEXT "global volume:",-1,125,83,46,8 28 | CONTROL "Slider1",26,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | 29 | WS_TABSTOP,125,92,100,11 30 | GROUPBOX "Sample",-1,235,0,110,107 31 | LISTBOX 30,240,10,100,35,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | 32 | WS_TABSTOP 33 | PUSHBUTTON "Play",31,240,50,100,12 34 | PUSHBUTTON "Add...",32,240,65,48,16 35 | PUSHBUTTON "Remove",33,292,65,48,16 36 | LTEXT "global volume:",-1,240,83,46,8 37 | CONTROL "Slider1",34,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | 38 | WS_TABSTOP,240,92,100,11 39 | PUSHBUTTON "Stop Output",41,20,112,60,14 40 | PUSHBUTTON "Resume",42,85,112,60,14 41 | LTEXT "volume:",-1,160,109,26,8 42 | CONTROL "Slider1",43,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | 43 | WS_TABSTOP,160,118,100,11 44 | LTEXT "CPU%",-1,291,120,25,8 45 | LTEXT "",40,316,120,30,8 46 | CONTROL "2 update threads",44,"Button",BS_AUTOCHECKBOX | 47 | WS_TABSTOP,272,109,69,10 48 | END 49 | -------------------------------------------------------------------------------- /Source/bass/c/basstest/basstest.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {DEE82226-C3D7-4C31-A234-8934FC43EF82} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;comctl32.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Windows 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;comctl32.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Windows 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Source/bass/c/basstest/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = basstest.exe 4 | FLAGS += -mwindows 5 | LIBS += -lcomdlg32 -lcomctl32 6 | 7 | all: $(TARGET) 8 | 9 | clean: 10 | $(RM) $(OUTDIR)\$(TARGET) 11 | -------------------------------------------------------------------------------- /Source/bass/c/bin/3dtest.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/3dtest.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/basstest.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/basstest.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/contest.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/contest.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/custloop.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/custloop.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/devlist.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/devlist.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/dsptest.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/dsptest.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/fxtest.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/fxtest.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/livefx.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/livefx.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/livespec.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/livespec.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/modtest.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/modtest.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/multi.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/multi.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/netradio.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/netradio.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/plugins.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/plugins.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/rectest.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/rectest.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/speakers.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/speakers.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/spectrum.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/spectrum.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/synth.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/synth.exe -------------------------------------------------------------------------------- /Source/bass/c/bin/writewav.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/bin/writewav.exe -------------------------------------------------------------------------------- /Source/bass/c/contest/contest.c: -------------------------------------------------------------------------------- 1 | /* 2 | BASS simple console player 3 | Copyright (c) 1999-2021 Un4seen Developments Ltd. 4 | */ 5 | 6 | #include 7 | #include 8 | #include "bass.h" 9 | 10 | #ifdef _WIN32 // Windows 11 | #include 12 | #else // OSX/Linux 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #define Sleep(x) usleep(x*1000) 19 | 20 | int _kbhit() 21 | { 22 | int r; 23 | fd_set rfds; 24 | struct timeval tv = { 0 }; 25 | struct termios term, oterm; 26 | tcgetattr(0, &oterm); 27 | memcpy(&term, &oterm, sizeof(term)); 28 | cfmakeraw(&term); 29 | tcsetattr(0, TCSANOW, &term); 30 | FD_ZERO(&rfds); 31 | FD_SET(0, &rfds); 32 | r = select(1, &rfds, NULL, NULL, &tv); 33 | tcsetattr(0, TCSANOW, &oterm); 34 | return r; 35 | } 36 | #endif 37 | 38 | // display error messages 39 | void Error(const char *text) 40 | { 41 | printf("Error(%d): %s\n", BASS_ErrorGetCode(), text); 42 | BASS_Free(); 43 | exit(0); 44 | } 45 | 46 | void ListDevices() 47 | { 48 | BASS_DEVICEINFO di; 49 | int a; 50 | for (a = 0; BASS_GetDeviceInfo(a, &di); a++) { 51 | if (di.flags & BASS_DEVICE_ENABLED) // enabled output device 52 | printf("dev %d: %s\n", a, di.name); 53 | } 54 | } 55 | 56 | int main(int argc, char **argv) 57 | { 58 | DWORD chan, act, level; 59 | BOOL ismod; 60 | QWORD pos; 61 | double secs; 62 | int a, filep, device = -1; 63 | BASS_CHANNELINFO info; 64 | 65 | printf("BASS simple console player\n" 66 | "--------------------------\n"); 67 | 68 | // check the correct BASS was loaded 69 | if (HIWORD(BASS_GetVersion()) != BASSVERSION) { 70 | printf("An incorrect version of BASS was loaded"); 71 | return 0; 72 | } 73 | 74 | for (filep = 1; filep < argc; filep++) { 75 | if (!strcmp(argv[filep], "-l")) { 76 | ListDevices(); 77 | return 0; 78 | } else if (!strcmp(argv[filep], "-d") && filep + 1 < argc) 79 | device = atoi(argv[++filep]); 80 | else 81 | break; 82 | } 83 | if (filep == argc) { 84 | printf("\tusage: contest [-l] [-d #] \n" 85 | "\t-l = list devices\n" 86 | "\t-d = device number\n"); 87 | return 0; 88 | } 89 | 90 | BASS_SetConfig(BASS_CONFIG_NET_PLAYLIST, 2); // enable playlist processing 91 | 92 | // initialize output device 93 | if (!BASS_Init(device, 48000, 0, 0, NULL)) 94 | Error("Can't initialize device"); 95 | 96 | ismod = FALSE; 97 | if (strstr(argv[filep], "://")) { 98 | // try streaming the URL 99 | chan = BASS_StreamCreateURL(argv[filep], 0, BASS_SAMPLE_LOOP, 0, 0); 100 | } else { 101 | // try streaming the file 102 | chan = BASS_StreamCreateFile(FALSE, argv[filep], 0, 0, BASS_SAMPLE_LOOP); 103 | if (!chan && BASS_ErrorGetCode() == BASS_ERROR_FILEFORM) { 104 | // try MOD music formats 105 | chan = BASS_MusicLoad(FALSE, argv[filep], 0, 0, BASS_SAMPLE_LOOP | BASS_MUSIC_RAMPS | BASS_MUSIC_PRESCAN, 1); 106 | ismod = TRUE; 107 | } 108 | } 109 | if (!chan) Error("Can't play the file"); 110 | 111 | BASS_ChannelGetInfo(chan, &info); 112 | printf("ctype: %x\n", info.ctype); 113 | if (!ismod) { 114 | if (info.origres) 115 | printf("format: %u Hz, %d chan, %d bit\n", info.freq, info.chans, LOWORD(info.origres)); 116 | else 117 | printf("format: %u Hz, %d chan\n", info.freq, info.chans); 118 | } 119 | pos = BASS_ChannelGetLength(chan, BASS_POS_BYTE); 120 | if (pos != -1) { 121 | double secs = BASS_ChannelBytes2Seconds(chan, pos); 122 | if (ismod) 123 | printf("length: %u:%02u (%llu samples), %u orders\n", (int)secs / 60, (int)secs % 60, (long long)(secs * info.freq), (DWORD)BASS_ChannelGetLength(chan, BASS_POS_MUSIC_ORDER)); 124 | else 125 | printf("length: %u:%02u (%llu samples)\n", (int)secs / 60, (int)secs % 60, (long long)(secs * info.freq)); 126 | } else if (ismod) 127 | printf("length: %u orders\n", (DWORD)BASS_ChannelGetLength(chan, BASS_POS_MUSIC_ORDER)); 128 | 129 | BASS_ChannelPlay(chan, FALSE); 130 | 131 | while (!_kbhit() && (act = BASS_ChannelIsActive(chan))) { 132 | // display some stuff and wait a bit 133 | level = BASS_ChannelGetLevel(chan); 134 | pos = BASS_ChannelGetPosition(chan, BASS_POS_BYTE); 135 | secs = BASS_ChannelBytes2Seconds(chan, pos); 136 | printf(" %u:%02u (%08lld)", (int)secs / 60, (int)secs % 60, (long long)(secs * info.freq)); 137 | if (ismod) { 138 | pos = BASS_ChannelGetPosition(chan, BASS_POS_MUSIC_ORDER); 139 | printf(" | %03u:%03u", LOWORD(pos), HIWORD(pos)); 140 | } 141 | printf(" | L "); 142 | if (act == BASS_ACTIVE_STALLED) { // playback has stalled 143 | printf("- buffering: %3u%% -", 100 - (DWORD)BASS_StreamGetFilePosition(chan, BASS_FILEPOS_BUFFERING)); 144 | } else { 145 | for (a = 27204; a > 200; a = a * 2 / 3) putchar(LOWORD(level) >= a ? '*' : '-'); 146 | putchar(' '); 147 | for (a = 210; a < 32768; a = a * 3 / 2) putchar(HIWORD(level) >= a ? '*' : '-'); 148 | } 149 | printf(" R | cpu %.2f%% \r", BASS_GetCPU()); 150 | fflush(stdout); 151 | Sleep(50); 152 | } 153 | printf(" \n"); 154 | 155 | BASS_Free(); 156 | return 0; 157 | } 158 | -------------------------------------------------------------------------------- /Source/bass/c/contest/contest.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {1151BD42-BAB0-4C67-A3CA-D23457250C41} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Console 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Console 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Source/bass/c/contest/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = contest.exe 4 | 5 | all: $(TARGET) 6 | 7 | clean: 8 | $(RM) $(OUTDIR)\$(TARGET) 9 | -------------------------------------------------------------------------------- /Source/bass/c/custloop/custloop.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {BC8FF451-F01D-404B-B39A-D7C59A567D95} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Windows 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Windows 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Source/bass/c/custloop/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = custloop.exe 4 | FLAGS += -mwindows 5 | LIBS += -lcomdlg32 -lgdi32 6 | 7 | all: $(TARGET) 8 | 9 | clean: 10 | $(RM) $(OUTDIR)\$(TARGET) 11 | -------------------------------------------------------------------------------- /Source/bass/c/devlist/devlist.c: -------------------------------------------------------------------------------- 1 | /* 2 | BASS device list example 3 | Copyright (c) 2014-2019 Un4seen Developments Ltd. 4 | */ 5 | 6 | #include 7 | #include "bass.h" 8 | 9 | void DisplayDeviceInfo(BASS_DEVICEINFO *di) 10 | { 11 | #if 0//def _WIN32 12 | const char *path = di->driver + strlen(di->driver) + 1; 13 | if (path[0]) 14 | printf("%s\n\tdriver: %s\n\tpath: %s\n\ttype: ", di->name, di->driver, path); 15 | else 16 | #endif 17 | printf("%s\n\tdriver: %s\n\ttype: ", di->name, di->driver); 18 | switch (di->flags & BASS_DEVICE_TYPE_MASK) { 19 | case BASS_DEVICE_TYPE_NETWORK: 20 | printf("Remote Network"); 21 | break; 22 | case BASS_DEVICE_TYPE_SPEAKERS: 23 | printf("Speakers"); 24 | break; 25 | case BASS_DEVICE_TYPE_LINE: 26 | printf("Line"); 27 | break; 28 | case BASS_DEVICE_TYPE_HEADPHONES: 29 | printf("Headphones"); 30 | break; 31 | case BASS_DEVICE_TYPE_MICROPHONE: 32 | printf("Microphone"); 33 | break; 34 | case BASS_DEVICE_TYPE_HEADSET: 35 | printf("Headset"); 36 | break; 37 | case BASS_DEVICE_TYPE_HANDSET: 38 | printf("Handset"); 39 | break; 40 | case BASS_DEVICE_TYPE_DIGITAL: 41 | printf("Digital"); 42 | break; 43 | case BASS_DEVICE_TYPE_SPDIF: 44 | printf("SPDIF"); 45 | break; 46 | case BASS_DEVICE_TYPE_HDMI: 47 | printf("HDMI"); 48 | break; 49 | case BASS_DEVICE_TYPE_DISPLAYPORT: 50 | printf("DisplayPort"); 51 | break; 52 | default: 53 | printf("Unknown"); 54 | } 55 | printf("\n\tflags:"); 56 | if (di->flags & BASS_DEVICE_LOOPBACK) printf(" loopback"); 57 | if (di->flags & BASS_DEVICE_ENABLED) printf(" enabled"); 58 | if (di->flags & BASS_DEVICE_DEFAULT) printf(" default"); 59 | printf(" (%x)\n", di->flags); 60 | } 61 | 62 | int main() 63 | { 64 | BASS_DEVICEINFO di; 65 | int a; 66 | printf("Output Devices\n"); 67 | for (a = 1; BASS_GetDeviceInfo(a, &di); a++) { 68 | printf("%d: ", a); 69 | DisplayDeviceInfo(&di); 70 | } 71 | printf("\nInput Devices\n"); 72 | for (a = 0; BASS_RecordGetDeviceInfo(a, &di); a++) { 73 | printf("%d: ", a); 74 | DisplayDeviceInfo(&di); 75 | } 76 | return 0; 77 | } 78 | -------------------------------------------------------------------------------- /Source/bass/c/devlist/devlist.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {1151BD42-BAB0-4C67-A3CA-D23457250C42} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Console 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Console 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Source/bass/c/devlist/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = devlist.exe 4 | 5 | all: $(TARGET) 6 | 7 | clean: 8 | $(RM) $(OUTDIR)\$(TARGET) 9 | -------------------------------------------------------------------------------- /Source/bass/c/dsptest/dsptest.c: -------------------------------------------------------------------------------- 1 | /* 2 | BASS DSP example 3 | Copyright (c) 2000-2021 Un4seen Developments Ltd. 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include "bass.h" 10 | 11 | #ifndef M_PI 12 | #define M_PI 3.14159265358979323846 13 | #endif 14 | 15 | HWND win; 16 | 17 | DWORD chan; // channel handle 18 | 19 | OPENFILENAME ofn; 20 | 21 | // display error messages 22 | void Error(const char *es) 23 | { 24 | char mes[200]; 25 | sprintf(mes, "%s\n(error code: %d)", es, BASS_ErrorGetCode()); 26 | MessageBox(win, mes, 0, 0); 27 | } 28 | 29 | 30 | // "rotate" 31 | HDSP rotdsp = 0; // DSP handle 32 | float rotpos; // cur.pos 33 | void CALLBACK Rotate(HDSP handle, DWORD channel, void *buffer, DWORD length, void *user) 34 | { 35 | float *d = (float*)buffer; 36 | DWORD a; 37 | 38 | for (a = 0; a < length / 4; a += 2) { 39 | d[a] *= fabs(sin(rotpos)); 40 | d[a + 1] *= fabs(cos(rotpos)); 41 | rotpos += 0.00003; 42 | } 43 | rotpos = fmod(rotpos, 2 * M_PI); 44 | } 45 | 46 | // "echo" 47 | HDSP echdsp = 0; // DSP handle 48 | #define ECHBUFLEN 1200 // buffer length 49 | float echbuf[ECHBUFLEN][2]; // buffer 50 | int echpos; // cur.pos 51 | void CALLBACK Echo(HDSP handle, DWORD channel, void *buffer, DWORD length, void *user) 52 | { 53 | float *d = (float*)buffer; 54 | DWORD a; 55 | 56 | for (a = 0; a < length / 4; a += 2) { 57 | float l = d[a] + (echbuf[echpos][1] / 2); 58 | float r = d[a + 1] + (echbuf[echpos][0] / 2); 59 | #if 1 // 0=echo, 1=basic "bathroom" reverb 60 | echbuf[echpos][0] = d[a] = l; 61 | echbuf[echpos][1] = d[a + 1] = r; 62 | #else 63 | echbuf[echpos][0] = d[a]; 64 | echbuf[echpos][1] = d[a + 1]; 65 | d[a] = l; 66 | d[a + 1] = r; 67 | #endif 68 | echpos++; 69 | if (echpos == ECHBUFLEN) echpos = 0; 70 | } 71 | } 72 | 73 | // "flanger" 74 | HDSP fladsp = 0; // DSP handle 75 | #define FLABUFLEN 350 // buffer length 76 | float flabuf[FLABUFLEN][2]; // buffer 77 | int flapos; // cur.pos 78 | float flas, flasinc; // sweep pos/increment 79 | void CALLBACK Flange(HDSP handle, DWORD channel, void *buffer, DWORD length, void *user) 80 | { 81 | float *d = (float*)buffer; 82 | DWORD a; 83 | 84 | for (a = 0; a < length / 4; a += 2) { 85 | int p1 = (flapos + (int)flas) % FLABUFLEN; 86 | int p2 = (p1 + 1) % FLABUFLEN; 87 | float f = flas - (int)flas; 88 | float s; 89 | 90 | s = (d[a] + ((flabuf[p1][0] * (1 - f)) + (flabuf[p2][0] * f))) * 0.7; 91 | flabuf[flapos][0] = d[a]; 92 | d[a] = s; 93 | 94 | s = (d[a + 1] + ((flabuf[p1][1] * (1 - f)) + (flabuf[p2][1] * f))) * 0.7; 95 | flabuf[flapos][1] = d[a + 1]; 96 | d[a + 1] = s; 97 | 98 | flapos++; 99 | if (flapos == FLABUFLEN) flapos = 0; 100 | flas += flasinc; 101 | if (flas < 0 || flas > FLABUFLEN - 1) { 102 | flasinc = -flasinc; 103 | flas += flasinc; 104 | } 105 | } 106 | } 107 | 108 | #define MESS(id,m,w,l) SendDlgItemMessage(win,id,m,(WPARAM)(w),(LPARAM)(l)) 109 | 110 | INT_PTR CALLBACK DialogProc(HWND h, UINT m, WPARAM w, LPARAM l) 111 | { 112 | switch (m) { 113 | case WM_COMMAND: 114 | switch (LOWORD(w)) { 115 | case IDCANCEL: 116 | EndDialog(h, 0); 117 | break; 118 | 119 | case 10: 120 | { 121 | char file[MAX_PATH] = ""; 122 | ofn.lpstrFile = file; 123 | if (GetOpenFileName(&ofn)) { 124 | BASS_ChannelFree(chan); // free the old channel 125 | if (!(chan = BASS_StreamCreateFile(FALSE, file, 0, 0, BASS_SAMPLE_LOOP | BASS_SAMPLE_FLOAT)) 126 | && !(chan = BASS_MusicLoad(FALSE, file, 0, 0, BASS_MUSIC_RAMPS | BASS_SAMPLE_LOOP | BASS_SAMPLE_FLOAT, 1))) { 127 | MESS(10, WM_SETTEXT, 0, "Open file..."); 128 | Error("Can't play the file"); 129 | } else { 130 | BASS_CHANNELINFO info; 131 | BASS_ChannelGetInfo(chan, &info); 132 | if (info.chans != 2) { // the DSP expects stereo 133 | MESS(10, WM_SETTEXT, 0, "Open file..."); 134 | BASS_ChannelFree(chan); 135 | Error("only stereo sources are supported"); 136 | } else { 137 | MESS(10, WM_SETTEXT, 0, strrchr(file, '\\') + 1); 138 | // setup DSPs on new channel 139 | SendMessage(win, WM_COMMAND, 11, 0); 140 | SendMessage(win, WM_COMMAND, 12, 0); 141 | SendMessage(win, WM_COMMAND, 13, 0); 142 | BASS_ChannelPlay(chan, FALSE); 143 | } 144 | } 145 | } 146 | } 147 | break; 148 | 149 | case 11: // toggle "rotate" 150 | if (MESS(11, BM_GETCHECK, 0, 0)) { 151 | rotpos = M_PI / 4; 152 | rotdsp = BASS_ChannelSetDSP(chan, &Rotate, 0, 2); 153 | } else 154 | BASS_ChannelRemoveDSP(chan, rotdsp); 155 | break; 156 | 157 | case 12: // toggle "echo" 158 | if (MESS(12, BM_GETCHECK, 0, 0)) { 159 | memset(echbuf, 0, sizeof(echbuf)); 160 | echpos = 0; 161 | echdsp = BASS_ChannelSetDSP(chan, &Echo, 0, 1); 162 | } else 163 | BASS_ChannelRemoveDSP(chan, echdsp); 164 | break; 165 | 166 | case 13: // toggle "flanger" 167 | if (MESS(13, BM_GETCHECK, 0, 0)) { 168 | memset(flabuf, 0, sizeof(flabuf)); 169 | flapos = 0; 170 | flas = FLABUFLEN / 2; 171 | flasinc = 0.002f; 172 | fladsp = BASS_ChannelSetDSP(chan, &Flange, 0, 0); 173 | } else 174 | BASS_ChannelRemoveDSP(chan, fladsp); 175 | break; 176 | } 177 | break; 178 | 179 | case WM_INITDIALOG: 180 | win = h; 181 | memset(&ofn, 0, sizeof(ofn)); 182 | ofn.lStructSize = sizeof(ofn); 183 | ofn.hwndOwner = h; 184 | ofn.nMaxFile = MAX_PATH; 185 | ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER; 186 | ofn.lpstrFilter = "Playable files\0*.mo3;*.xm;*.mod;*.s3m;*.it;*.mtm;*.umx;*.mp3;*.mp2;*.mp1;*.ogg;*.wav;*.aif\0All files\0*.*\0\0"; 187 | // initialize default output device 188 | if (!BASS_Init(-1, 44100, 0, win, NULL)) { 189 | Error("Can't initialize device"); 190 | EndDialog(h, 0); 191 | break; 192 | } 193 | // enable floating-point DSP (not really necessary as the channels will be floating-point anyway) 194 | BASS_SetConfig(BASS_CONFIG_FLOATDSP, TRUE); 195 | return 1; 196 | 197 | case WM_DESTROY: 198 | BASS_Free(); 199 | break; 200 | } 201 | 202 | return 0; 203 | } 204 | 205 | int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 206 | { 207 | // check the correct BASS was loaded 208 | if (HIWORD(BASS_GetVersion()) != BASSVERSION) { 209 | MessageBox(0, "An incorrect version of BASS.DLL was loaded", 0, MB_ICONERROR); 210 | return 0; 211 | } 212 | 213 | DialogBox(hInstance, MAKEINTRESOURCE(1000), NULL, DialogProc); 214 | 215 | return 0; 216 | } 217 | -------------------------------------------------------------------------------- /Source/bass/c/dsptest/dsptest.rc: -------------------------------------------------------------------------------- 1 | #include "windows.h" 2 | 3 | 1000 DIALOG DISCARDABLE 100, 100, 200, 49 4 | STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 5 | CAPTION "BASS DSP example" 6 | FONT 8, "MS Sans Serif" 7 | BEGIN 8 | PUSHBUTTON "Open file...",10,5,5,190,14 9 | CONTROL "rotate",11,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,40,30, 10 | 35,10 11 | CONTROL "echo",12,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,80,30,35, 12 | 10 13 | CONTROL "flanger",13,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,120, 14 | 30,35,10 15 | END 16 | -------------------------------------------------------------------------------- /Source/bass/c/dsptest/dsptest.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {89104783-85C4-4E31-9EDC-FAF7D6792BF0} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Windows 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Windows 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Source/bass/c/dsptest/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = dsptest.exe 4 | FLAGS += -mwindows 5 | LIBS += -lcomdlg32 6 | 7 | all: $(TARGET) 8 | 9 | clean: 10 | $(RM) $(OUTDIR)\$(TARGET) 11 | -------------------------------------------------------------------------------- /Source/bass/c/fxtest/fxtest.c: -------------------------------------------------------------------------------- 1 | /* 2 | BASS effects example 3 | Copyright (c) 2001-2021 Un4seen Developments Ltd. 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "bass.h" 11 | 12 | HWND win; 13 | 14 | DWORD chan; // channel handle 15 | DWORD fxchan; // output stream handle 16 | DWORD fxchansync; // output stream FREE sync 17 | HFX fx[4]; // 3 eq bands + reverb 18 | 19 | OPENFILENAME ofn; 20 | 21 | // display error messages 22 | void Error(const char *es) 23 | { 24 | char mes[200]; 25 | sprintf(mes, "%s\n(error code: %d)", es, BASS_ErrorGetCode()); 26 | MessageBox(win, mes, 0, 0); 27 | } 28 | 29 | #define MESS(id,m,w,l) SendDlgItemMessage(win,id,m,(WPARAM)(w),(LPARAM)(l)) 30 | 31 | void UpdateFX(int b) 32 | { 33 | int v = MESS(20 + b, TBM_GETPOS, 0, 0); 34 | if (b < 3) { // EQ 35 | BASS_DX8_PARAMEQ p; 36 | BASS_FXGetParameters(fx[b], &p); 37 | p.fGain = 10.0 - v; 38 | BASS_FXSetParameters(fx[b], &p); 39 | } else if (b == 3) { // reverb 40 | BASS_DX8_REVERB p; 41 | BASS_FXGetParameters(fx[3], &p); 42 | p.fReverbMix = (v < 20 ? log(1 - v / 20.0) * 20 : -96); 43 | BASS_FXSetParameters(fx[3], &p); 44 | } else // volume 45 | BASS_ChannelSetAttribute(chan, BASS_ATTRIB_VOL, (20 - v) / 10.f); 46 | } 47 | 48 | void SetupFX() 49 | { 50 | // setup the effects 51 | BASS_DX8_PARAMEQ p; 52 | DWORD ch = fxchan ? fxchan : chan; // set on output stream if enabled, else file stream 53 | fx[0] = BASS_ChannelSetFX(ch, BASS_FX_DX8_PARAMEQ, 0); 54 | fx[1] = BASS_ChannelSetFX(ch, BASS_FX_DX8_PARAMEQ, 0); 55 | fx[2] = BASS_ChannelSetFX(ch, BASS_FX_DX8_PARAMEQ, 0); 56 | fx[3] = BASS_ChannelSetFX(ch, BASS_FX_DX8_REVERB, 0); 57 | p.fGain = 0; 58 | p.fBandwidth = 18; 59 | p.fCenter = 125; 60 | BASS_FXSetParameters(fx[0], &p); 61 | p.fCenter = 1000; 62 | BASS_FXSetParameters(fx[1], &p); 63 | p.fCenter = 8000; 64 | BASS_FXSetParameters(fx[2], &p); 65 | UpdateFX(0); 66 | UpdateFX(1); 67 | UpdateFX(2); 68 | UpdateFX(3); 69 | } 70 | 71 | void CALLBACK DeviceFreeSync(HSYNC handle, DWORD channel, DWORD data, void *user) 72 | { 73 | // the device output stream has been freed due to format change, get a new one with new format 74 | if (!fxchan) return; 75 | fxchan = BASS_StreamCreate(0, 0, 0, STREAMPROC_DEVICE, 0); 76 | fxchansync = BASS_ChannelSetSync(fxchan, BASS_SYNC_FREE, 0, DeviceFreeSync, 0); 77 | SetupFX(); 78 | } 79 | 80 | INT_PTR CALLBACK DialogProc(HWND h, UINT m, WPARAM w, LPARAM l) 81 | { 82 | switch (m) { 83 | case WM_COMMAND: 84 | switch (LOWORD(w)) { 85 | case IDCANCEL: 86 | EndDialog(h, 0); 87 | break; 88 | 89 | case 10: 90 | { 91 | char file[MAX_PATH] = ""; 92 | ofn.lpstrFile = file; 93 | if (GetOpenFileName(&ofn)) { 94 | BASS_ChannelFree(chan); // free the old channel 95 | if (!(chan = BASS_StreamCreateFile(FALSE, file, 0, 0, BASS_SAMPLE_LOOP | BASS_SAMPLE_FLOAT)) 96 | && !(chan = BASS_MusicLoad(FALSE, file, 0, 0, BASS_MUSIC_RAMPS | BASS_SAMPLE_LOOP | BASS_SAMPLE_FLOAT, 1))) { 97 | MESS(10, WM_SETTEXT, 0, "Open file..."); 98 | Error("Can't play the file"); 99 | break; 100 | } 101 | MESS(10, WM_SETTEXT, 0, strrchr(file, '\\') + 1); 102 | if (!fxchan) SetupFX(); // set effects on file if not using output stream 103 | UpdateFX(4); // set volume 104 | BASS_ChannelPlay(chan, FALSE); 105 | } 106 | } 107 | break; 108 | 109 | case 30: 110 | { 111 | // remove current effects 112 | DWORD ch = fxchan ? fxchan : chan; 113 | BASS_ChannelRemoveFX(ch, fx[0]); 114 | BASS_ChannelRemoveFX(ch, fx[1]); 115 | BASS_ChannelRemoveFX(ch, fx[2]); 116 | BASS_ChannelRemoveFX(ch, fx[3]); 117 | if (MESS(30, BM_GETCHECK, 0, 0)) { 118 | fxchan = BASS_StreamCreate(0, 0, 0, STREAMPROC_DEVICE, 0); // get device output stream 119 | fxchansync = BASS_ChannelSetSync(fxchan, BASS_SYNC_FREE, 0, DeviceFreeSync, 0); // sync when device output stream is freed (format change) 120 | } else { 121 | BASS_ChannelRemoveSync(fxchan, fxchansync); // remove sync from device output stream 122 | fxchan = 0; // stop using device output stream 123 | } 124 | SetupFX(); 125 | } 126 | break; 127 | } 128 | break; 129 | 130 | case WM_VSCROLL: 131 | if (l) UpdateFX(GetDlgCtrlID((HWND)l) - 20); 132 | break; 133 | 134 | case WM_INITDIALOG: 135 | win = h; 136 | memset(&ofn, 0, sizeof(ofn)); 137 | ofn.lStructSize = sizeof(ofn); 138 | ofn.hwndOwner = h; 139 | ofn.nMaxFile = MAX_PATH; 140 | ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER; 141 | ofn.lpstrFilter = "Playable files\0*.mo3;*.xm;*.mod;*.s3m;*.it;*.mtm;*.umx;*.mp3;*.mp2;*.mp1;*.ogg;*.wav;*.aif\0All files\0*.*\0\0"; 142 | // initialize default device 143 | if (!BASS_Init(-1, 44100, 0, win, NULL)) { 144 | Error("Can't initialize device"); 145 | EndDialog(win, 0); 146 | return 0; 147 | } 148 | { 149 | // check that DX8 features are available 150 | BASS_INFO bi = { sizeof(bi) }; 151 | BASS_GetInfo(&bi); 152 | if (bi.dsver < 8) { 153 | BASS_Free(); 154 | Error("DirectX 8 is not installed"); 155 | EndDialog(win, 0); 156 | return 0; 157 | } 158 | } 159 | // initialize effect sliders 160 | MESS(20, TBM_SETRANGE, FALSE, MAKELONG(0, 20)); 161 | MESS(20, TBM_SETTIC, 0, 10); 162 | MESS(20, TBM_SETPOS, TRUE, 10); 163 | MESS(21, TBM_SETRANGE, FALSE, MAKELONG(0, 20)); 164 | MESS(21, TBM_SETTIC, 0, 10); 165 | MESS(21, TBM_SETPOS, TRUE, 10); 166 | MESS(22, TBM_SETRANGE, FALSE, MAKELONG(0, 20)); 167 | MESS(22, TBM_SETTIC, 0, 10); 168 | MESS(22, TBM_SETPOS, TRUE, 10); 169 | MESS(23, TBM_SETRANGE, FALSE, MAKELONG(0, 20)); 170 | MESS(23, TBM_SETPOS, TRUE, 20); 171 | MESS(24, TBM_SETRANGE, FALSE, MAKELONG(0, 20)); 172 | MESS(24, TBM_SETTIC, 0, 10); 173 | MESS(24, TBM_SETPOS, TRUE, 10); 174 | return 1; 175 | 176 | case WM_DESTROY: 177 | if (fxchan) BASS_ChannelRemoveSync(fxchan, fxchansync); // remove sync from device output stream 178 | BASS_Free(); 179 | break; 180 | } 181 | 182 | return 0; 183 | } 184 | 185 | int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 186 | { 187 | // check the correct BASS was loaded 188 | if (HIWORD(BASS_GetVersion()) != BASSVERSION) { 189 | MessageBox(0, "An incorrect version of BASS.DLL was loaded", 0, MB_ICONERROR); 190 | return 0; 191 | } 192 | 193 | { 194 | INITCOMMONCONTROLSEX cc = { sizeof(cc), ICC_BAR_CLASSES }; 195 | InitCommonControlsEx(&cc); 196 | } 197 | 198 | DialogBox(hInstance, MAKEINTRESOURCE(1000), NULL, DialogProc); 199 | 200 | return 0; 201 | } 202 | -------------------------------------------------------------------------------- /Source/bass/c/fxtest/fxtest.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 1000 DIALOG DISCARDABLE 100, 100, 200, 110 4 | STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 5 | CAPTION "BASS effects example" 6 | FONT 8, "MS Sans Serif" 7 | BEGIN 8 | PUSHBUTTON "Open file...",10,5,5,190,14 9 | CONTROL "",20,"msctls_trackbar32",TBS_BOTH | TBS_VERT | 10 | WS_TABSTOP,10,25,30,55 11 | CONTROL "",21,"msctls_trackbar32",TBS_BOTH | TBS_VERT | 12 | WS_TABSTOP,45,25,30,55 13 | CONTROL "",22,"msctls_trackbar32",TBS_BOTH | TBS_VERT | 14 | WS_TABSTOP,80,25,30,55 15 | CONTROL "",23,"msctls_trackbar32",TBS_BOTH | TBS_VERT | 16 | WS_TABSTOP,120,25,30,55 17 | CONTROL "",24,"msctls_trackbar32",TBS_BOTH | TBS_VERT | 18 | WS_TABSTOP,160,25,30,55 19 | CTEXT "125 hz",-1,10,82,30,8 20 | CTEXT "1 khz",-1,45,82,30,8 21 | CTEXT "8 khz",-1,80,82,30,8 22 | CTEXT "reverb",-1,120,82,30,8 23 | CTEXT "volume",-1,160,82,30,8 24 | CONTROL "Apply effects to final output instead of file",30,"Button",BS_AUTOCHECKBOX | 25 | WS_TABSTOP,5,97,150,10 26 | END 27 | -------------------------------------------------------------------------------- /Source/bass/c/fxtest/fxtest.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {46119084-C4AA-4240-A2D6-A6AFC1A82106} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;comctl32.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Windows 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;comctl32.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Windows 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Source/bass/c/fxtest/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = fxtest.exe 4 | FLAGS += -mwindows 5 | LIBS += -lcomdlg32 -lcomctl32 6 | 7 | all: $(TARGET) 8 | 9 | clean: 10 | $(RM) $(OUTDIR)\$(TARGET) 11 | -------------------------------------------------------------------------------- /Source/bass/c/livefx/livefx.rc: -------------------------------------------------------------------------------- 1 | #include "windows.h" 2 | 3 | 1000 DIALOG DISCARDABLE 200, 100, 140, 90 4 | STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 5 | CAPTION "BASS full-duplex example" 6 | FONT 8, "MS Sans Serif" 7 | BEGIN 8 | COMBOBOX 16,5,5,130,72,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP 9 | COMBOBOX 13,5,20,130,72,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP 10 | CONTROL "Manage buffer level",15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,38, 11 | 80,10 12 | CTEXT "",18,85,37,50,12,SS_CENTERIMAGE | SS_SUNKEN 13 | CONTROL "",14,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | 14 | WS_TABSTOP,5,52,130,11 15 | CONTROL "Reverb",20,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,65, 16 | 42,10 17 | CONTROL "Gargle",21,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,70,65, 18 | 42,10 19 | CONTROL "Flanger",22,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, 20 | 5,77,42,10 21 | CONTROL "Chorus",23,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,70, 22 | 77,42,10 23 | END 24 | -------------------------------------------------------------------------------- /Source/bass/c/livefx/livefx.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {0C580261-3DF5-4160-BE1A-17BCC66BEE8C} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;comctl32.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Windows 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;comctl32.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Windows 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Source/bass/c/livefx/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = livefx.exe 4 | FLAGS += -mwindows 5 | LIBS += -lcomctl32 6 | 7 | all: $(TARGET) 8 | 9 | clean: 10 | $(RM) $(OUTDIR)\$(TARGET) 11 | -------------------------------------------------------------------------------- /Source/bass/c/livespec/livespec.c: -------------------------------------------------------------------------------- 1 | /* 2 | BASS live spectrum analyser example 3 | Copyright (c) 2002-2021 Un4seen Developments Ltd. 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include "bass.h" 10 | 11 | #define SPECWIDTH 368 // display width 12 | #define SPECHEIGHT 127 // height (changing requires palette adjustments too) 13 | #define SPECRATE 30 // refresh rate 14 | 15 | HWND win; 16 | DWORD timer; 17 | 18 | HRECORD chan; // recording channel 19 | 20 | HDC specdc; 21 | HBITMAP specbmp; 22 | BYTE *specbuf; 23 | 24 | int specmode; // spectrum mode 25 | int specpos; // marker pos for 3D mode 26 | 27 | // display error messages 28 | void Error(const char *es) 29 | { 30 | char mes[200]; 31 | sprintf(mes, "%s\n(error code: %d)", es, BASS_ErrorGetCode()); 32 | MessageBox(win, mes, 0, 0); 33 | } 34 | 35 | // update the display 36 | void CALLBACK UpdateSpectrum(UINT uTimerID, UINT uMsg, DWORD_PTR dwUser, DWORD_PTR dw1, DWORD_PTR dw2) 37 | { 38 | static DWORD quietcount = 0; 39 | HDC dc; 40 | int x, y, y1; 41 | 42 | if (specmode == 3) { // waveform 43 | short buf[SPECWIDTH]; 44 | BASS_ChannelGetData(chan, buf, sizeof(buf)); // get the sample data 45 | memset(specbuf, 0, SPECWIDTH * SPECHEIGHT); 46 | for (x = 0; x < SPECWIDTH; x++) { 47 | int v = buf[x] * SPECHEIGHT / 65536; // scale to fit display 48 | if (!x) y = v; 49 | do { // draw line from previous sample... 50 | if (y < v) y++; 51 | else if (y > v) y--; 52 | specbuf[y * SPECWIDTH + x] = abs(y - SPECHEIGHT / 2) * 2 + 1; 53 | } while (y != v); 54 | } 55 | } else { 56 | float fft[1024]; 57 | BASS_ChannelGetData(chan, fft, BASS_DATA_FFT2048); // get the FFT data 58 | 59 | if (!specmode) { // "normal" FFT 60 | memset(specbuf, 0, SPECWIDTH * SPECHEIGHT); 61 | for (x = 0; x < SPECWIDTH / 2; x++) { 62 | #if 1 63 | y = sqrt(fft[x + 1]) * 3 * SPECHEIGHT - 4; // scale it (sqrt to make low values more visible) 64 | #else 65 | y = fft[x + 1] * 10 * SPECHEIGHT; // scale it (linearly) 66 | #endif 67 | if (y > SPECHEIGHT) y = SPECHEIGHT; // cap it 68 | if (x && (y1 = (y + y1) / 2)) // interpolate from previous to make the display smoother 69 | while (--y1 >= 0) specbuf[y1 * SPECWIDTH + x * 2 - 1] = y1 + 1; 70 | y1 = y; 71 | while (--y >= 0) specbuf[y * SPECWIDTH + x * 2] = y + 1; // draw level 72 | } 73 | } else if (specmode == 1) { // logarithmic, combine bins 74 | int b0 = 0; 75 | memset(specbuf, 0, SPECWIDTH * SPECHEIGHT); 76 | #define BANDS 28 77 | for (x = 0; x < BANDS; x++) { 78 | float peak = 0; 79 | int b1 = pow(2, x * 10.0 / (BANDS - 1)); 80 | if (b1 <= b0) b1 = b0 + 1; // make sure it uses at least 1 FFT bin 81 | if (b1 > 1023) b1 = 1023; 82 | for (; b0 < b1; b0++) 83 | if (peak < fft[1 + b0]) peak = fft[1 + b0]; 84 | y = sqrt(peak) * 3 * SPECHEIGHT - 4; // scale it (sqrt to make low values more visible) 85 | if (y > SPECHEIGHT) y = SPECHEIGHT; // cap it 86 | while (--y >= 0) 87 | memset(specbuf + y * SPECWIDTH + x * (SPECWIDTH / BANDS), y + 1, SPECWIDTH / BANDS - 2); // draw bar 88 | } 89 | } else { // "3D" 90 | for (x = 0; x < SPECHEIGHT; x++) { 91 | y = sqrt(fft[x + 1]) * 3 * 127; // scale it (sqrt to make low values more visible) 92 | if (y > 127) y = 127; // cap it 93 | specbuf[x * SPECWIDTH + specpos] = 128 + y; // plot it 94 | } 95 | // move marker onto next position 96 | specpos = (specpos + 1) % SPECWIDTH; 97 | for (x = 0; x < SPECHEIGHT; x++) specbuf[x * SPECWIDTH + specpos] = 255; 98 | } 99 | } 100 | 101 | // update the display 102 | dc = GetDC(win); 103 | BitBlt(dc, 0, 0, SPECWIDTH, SPECHEIGHT, specdc, 0, 0, SRCCOPY); 104 | if (LOWORD(BASS_ChannelGetLevel(chan)) < 1000) { // check if it's quiet 105 | quietcount++; 106 | if (quietcount > SPECRATE && (quietcount & 16)) { // it's been quiet for over a second 107 | RECT r = { 0, 0, SPECWIDTH, SPECHEIGHT }; 108 | SetTextColor(dc, 0xffffff); 109 | SetBkMode(dc, TRANSPARENT); 110 | DrawText(dc, "make some noise!", -1, &r, DT_CENTER | DT_VCENTER | DT_SINGLELINE); 111 | } 112 | } else 113 | quietcount = 0; // not quiet 114 | ReleaseDC(win, dc); 115 | } 116 | 117 | // Recording callback - not doing anything with the data 118 | BOOL CALLBACK RecordProc(HRECORD handle, const void *buffer, DWORD length, void *user) 119 | { 120 | return TRUE; // continue recording 121 | } 122 | 123 | LRESULT CALLBACK SpectrumWindowProc(HWND h, UINT m, WPARAM w, LPARAM l) 124 | { 125 | switch (m) { 126 | case WM_PAINT: 127 | if (GetUpdateRect(h, 0, 0)) { 128 | PAINTSTRUCT p; 129 | HDC dc; 130 | if (!(dc = BeginPaint(h, &p))) return 0; 131 | BitBlt(dc, 0, 0, SPECWIDTH, SPECHEIGHT, specdc, 0, 0, SRCCOPY); 132 | EndPaint(h, &p); 133 | } 134 | return 0; 135 | 136 | case WM_LBUTTONUP: 137 | specmode = (specmode + 1) % 4; // change spectrum mode 138 | memset(specbuf, 0, SPECWIDTH * SPECHEIGHT); // clear display 139 | return 0; 140 | 141 | case WM_CREATE: 142 | win = h; 143 | // initialize default recording device 144 | if (!BASS_RecordInit(-1)) { 145 | Error("Can't initialize device"); 146 | return -1; 147 | } 148 | // start recording (44100hz mono 16-bit) 149 | if (!(chan = BASS_RecordStart(44100, 1, 0, RecordProc, 0))) { 150 | Error("Can't start recording"); 151 | return -1; 152 | } 153 | 154 | { // create bitmap to draw spectrum in (8 bit for easy updating) 155 | BYTE data[2000] = { 0 }; 156 | BITMAPINFOHEADER *bh = (BITMAPINFOHEADER*)data; 157 | RGBQUAD *pal = (RGBQUAD*)(data + sizeof(*bh)); 158 | int a; 159 | bh->biSize = sizeof(*bh); 160 | bh->biWidth = SPECWIDTH; 161 | bh->biHeight = SPECHEIGHT; // upside down (line 0=bottom) 162 | bh->biPlanes = 1; 163 | bh->biBitCount = 8; 164 | bh->biClrUsed = bh->biClrImportant = 256; 165 | // setup palette 166 | for (a = 1; a < 128; a++) { 167 | pal[a].rgbGreen = 256 - 2 * a; 168 | pal[a].rgbRed = 2 * a; 169 | } 170 | for (a = 0; a < 32; a++) { 171 | pal[128 + a].rgbBlue = 8 * a; 172 | pal[128 + 32 + a].rgbBlue = 255; 173 | pal[128 + 32 + a].rgbRed = 8 * a; 174 | pal[128 + 64 + a].rgbRed = 255; 175 | pal[128 + 64 + a].rgbBlue = 8 * (31 - a); 176 | pal[128 + 64 + a].rgbGreen = 8 * a; 177 | pal[128 + 96 + a].rgbRed = 255; 178 | pal[128 + 96 + a].rgbGreen = 255; 179 | pal[128 + 96 + a].rgbBlue = 8 * a; 180 | } 181 | // create the bitmap 182 | specbmp = CreateDIBSection(0, (BITMAPINFO*)bh, DIB_RGB_COLORS, (void**)&specbuf, NULL, 0); 183 | specdc = CreateCompatibleDC(0); 184 | SelectObject(specdc, specbmp); 185 | } 186 | // start display update timer 187 | timer = timeSetEvent(1000 / SPECRATE, 1000 / SPECRATE, UpdateSpectrum, 0, TIME_PERIODIC); 188 | break; 189 | 190 | case WM_DESTROY: 191 | if (timer) timeKillEvent(timer); 192 | BASS_RecordFree(); 193 | if (specdc) DeleteDC(specdc); 194 | if (specbmp) DeleteObject(specbmp); 195 | PostQuitMessage(0); 196 | break; 197 | } 198 | 199 | return DefWindowProc(h, m, w, l); 200 | } 201 | 202 | int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 203 | { 204 | WNDCLASS wc; 205 | MSG msg; 206 | 207 | // check the correct BASS was loaded 208 | if (HIWORD(BASS_GetVersion()) != BASSVERSION) { 209 | MessageBox(0, "An incorrect version of BASS.DLL was loaded", 0, MB_ICONERROR); 210 | return 0; 211 | } 212 | 213 | // register window class and create the window 214 | memset(&wc, 0, sizeof(wc)); 215 | wc.lpfnWndProc = SpectrumWindowProc; 216 | wc.hInstance = hInstance; 217 | wc.hCursor = LoadCursor(NULL, IDC_ARROW); 218 | wc.lpszClassName = "BASS-Spectrum"; 219 | if (!RegisterClass(&wc) || !CreateWindow("BASS-Spectrum", 220 | "BASS live spectrum (click to switch mode)", 221 | WS_POPUPWINDOW | WS_CAPTION | WS_VISIBLE, 200, 200, 222 | SPECWIDTH + 2 * GetSystemMetrics(SM_CXDLGFRAME), 223 | SPECHEIGHT + GetSystemMetrics(SM_CYCAPTION) + 2 * GetSystemMetrics(SM_CYDLGFRAME), 224 | NULL, NULL, hInstance, NULL)) { 225 | Error("Can't create window"); 226 | return 0; 227 | } 228 | ShowWindow(win, SW_SHOWNORMAL); 229 | 230 | while (GetMessage(&msg, NULL, 0, 0) > 0) { 231 | TranslateMessage(&msg); 232 | DispatchMessage(&msg); 233 | } 234 | 235 | return 0; 236 | } 237 | -------------------------------------------------------------------------------- /Source/bass/c/livespec/livespec.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {6AAE12B9-8731-4CDE-BD76-EC5B4EC5AE48} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;winmm.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Windows 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;winmm.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Windows 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Source/bass/c/livespec/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = livespec.exe 4 | FLAGS += -mwindows 5 | LIBS += -lgdi32 -lwinmm 6 | 7 | all: $(TARGET) 8 | 9 | clean: 10 | $(RM) $(OUTDIR)\$(TARGET) 11 | -------------------------------------------------------------------------------- /Source/bass/c/makefile: -------------------------------------------------------------------------------- 1 | EXAMPLES = 3dtest basstest contest custloop devlist dsptest fxtest livefx livespec modtest multi netradio plugins rectest speakers spectrum synth writewav 2 | 3 | .PHONY: all clean $(EXAMPLES) 4 | 5 | all: $(EXAMPLES) 6 | 7 | clean: 8 | @$(foreach x,$(EXAMPLES),$(MAKE) -C $(x) clean;) 9 | 10 | $(EXAMPLES): 11 | $(MAKE) -C $@ 12 | -------------------------------------------------------------------------------- /Source/bass/c/makefile.in: -------------------------------------------------------------------------------- 1 | FLAGS = -Os -I.. -L.. 2 | LIBS = -lbass 3 | OUTDIR = ..\bin 4 | 5 | CC = gcc 6 | RM = del 7 | RES = windres 8 | 9 | %.exe: %.c %.rc 10 | $(RES) -i $*.rc -o rsrc.obj 11 | $(CC) $(FLAGS) $*.c rsrc.obj $(LIBS) -o $(OUTDIR)\$@ 12 | $(RM) rsrc.obj 13 | 14 | %.exe: %.c 15 | $(CC) $(FLAGS) $*.c $(LIBS) -o $(OUTDIR)\$@ 16 | 17 | .PHONY: all clean 18 | -------------------------------------------------------------------------------- /Source/bass/c/modtest/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = modtest.exe 4 | FLAGS += -mwindows 5 | LIBS += -lcomdlg32 -lcomctl32 6 | 7 | all: $(TARGET) 8 | 9 | clean: 10 | $(RM) $(OUTDIR)\$(TARGET) 11 | -------------------------------------------------------------------------------- /Source/bass/c/modtest/modtest.c: -------------------------------------------------------------------------------- 1 | /* 2 | BASS MOD music example 3 | Copyright (c) 1999-2021 Un4seen Developments Ltd. 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include "bass.h" 10 | 11 | HWND win; 12 | 13 | HMUSIC music; 14 | 15 | OPENFILENAME ofn; 16 | 17 | // display error messages 18 | void Error(char *es) 19 | { 20 | char mes[200]; 21 | sprintf(mes, "%s\n(error code: %d)", es, BASS_ErrorGetCode()); 22 | MessageBox(win, mes, "Error", 0); 23 | } 24 | 25 | #define MESS(id,m,w,l) SendDlgItemMessage(win,id,m,(WPARAM)w,(LPARAM)l) 26 | 27 | DWORD GetFlags() 28 | { 29 | DWORD flags = BASS_MUSIC_POSRESET; // stop notes when seeking 30 | switch (MESS(21, CB_GETCURSEL, 0, 0)) { 31 | case 0: 32 | flags |= BASS_MUSIC_NONINTER; // no interpolation 33 | break; 34 | case 2: 35 | flags |= BASS_MUSIC_SINCINTER; // sinc interpolation 36 | break; 37 | } 38 | switch (MESS(22, CB_GETCURSEL, 0, 0)) { 39 | case 1: 40 | flags |= BASS_MUSIC_RAMP; // ramping 41 | break; 42 | case 2: 43 | flags |= BASS_MUSIC_RAMPS; // "sensitive" ramping 44 | break; 45 | } 46 | switch (MESS(23, CB_GETCURSEL, 0, 0)) { 47 | case 1: 48 | flags |= BASS_MUSIC_SURROUND; // surround 49 | break; 50 | case 2: 51 | flags |= BASS_MUSIC_SURROUND2; // "mode2" 52 | break; 53 | } 54 | return flags; 55 | } 56 | 57 | INT_PTR CALLBACK DialogProc(HWND h, UINT m, WPARAM w, LPARAM l) 58 | { 59 | switch (m) { 60 | case WM_TIMER: 61 | { // update display 62 | char text[16]; 63 | QWORD pos = BASS_ChannelGetPosition(music, BASS_POS_MUSIC_ORDER); 64 | if (pos != (QWORD)-1) { 65 | MESS(20, TBM_SETPOS, 1, LOWORD(pos)); 66 | sprintf(text, "%03d.%03d", LOWORD(pos), HIWORD(pos)); 67 | MESS(15, WM_SETTEXT, 0, text); 68 | } 69 | } 70 | break; 71 | 72 | case WM_COMMAND: 73 | switch (LOWORD(w)) { 74 | case IDCANCEL: 75 | EndDialog(h, 0); 76 | break; 77 | 78 | case 10: 79 | { 80 | char file[MAX_PATH] = ""; 81 | ofn.lpstrFile = file; 82 | if (GetOpenFileName(&ofn)) { 83 | BASS_MusicFree(music); // free the current MOD music 84 | music = BASS_MusicLoad(FALSE, file, 0, 0, GetFlags() | BASS_SAMPLE_FLOAT, 1); // load the new MOD music 85 | if (music) { // success 86 | DWORD length = BASS_ChannelGetLength(music, BASS_POS_MUSIC_ORDER); // get the order length 87 | MESS(10, WM_SETTEXT, 0, strrchr(file, '\\') + 1); 88 | { 89 | char text[100], *ctype = ""; 90 | BASS_CHANNELINFO info; 91 | int channels = 0; 92 | while (BASS_ChannelGetAttributeEx(music, BASS_ATTRIB_MUSIC_VOL_CHAN + channels, 0, 0)) 93 | channels++; // count channels 94 | BASS_ChannelGetInfo(music, &info); 95 | switch (info.ctype & ~BASS_CTYPE_MUSIC_MO3) { 96 | case BASS_CTYPE_MUSIC_MOD: 97 | ctype = "MOD"; 98 | break; 99 | case BASS_CTYPE_MUSIC_MTM: 100 | ctype = "MTM"; 101 | break; 102 | case BASS_CTYPE_MUSIC_S3M: 103 | ctype = "S3M"; 104 | break; 105 | case BASS_CTYPE_MUSIC_XM: 106 | ctype = "XM"; 107 | break; 108 | case BASS_CTYPE_MUSIC_IT: 109 | ctype = "IT"; 110 | break; 111 | } 112 | _snprintf(text, sizeof(text), "name: %s, format: %dch %s%s", 113 | BASS_ChannelGetTags(music, BASS_TAG_MUSIC_NAME), channels, ctype, info.ctype & BASS_CTYPE_MUSIC_MO3 ? " (MO3)" : ""); 114 | MESS(11, WM_SETTEXT, 0, text); 115 | } 116 | MESS(20, TBM_SETRANGEMAX, 1, length - 1); // update scroller range 117 | BASS_ChannelPlay(music, FALSE); // start it 118 | } else { // failed 119 | MESS(10, WM_SETTEXT, 0, "Open file..."); 120 | MESS(11, WM_SETTEXT, 0, ""); 121 | MESS(15, WM_SETTEXT, 0, ""); 122 | Error("Can't play the file"); 123 | } 124 | } 125 | } 126 | break; 127 | 128 | case 12: 129 | if (BASS_ChannelIsActive(music) == BASS_ACTIVE_PLAYING) 130 | BASS_ChannelPause(music); 131 | else 132 | BASS_ChannelPlay(music, FALSE); 133 | break; 134 | 135 | case 21: 136 | case 22: 137 | case 23: 138 | BASS_ChannelFlags(music, GetFlags(), -1); // update flags 139 | break; 140 | } 141 | break; 142 | 143 | case WM_HSCROLL: 144 | if (l && LOWORD(w) != SB_THUMBPOSITION && LOWORD(w) != SB_ENDSCROLL) { 145 | int pos = SendMessage((HWND)l, TBM_GETPOS, 0, 0); 146 | BASS_ChannelSetPosition(music, pos, BASS_POS_MUSIC_ORDER); // set the position 147 | } 148 | break; 149 | 150 | case WM_INITDIALOG: 151 | win = h; 152 | // initialize default output device 153 | if (!BASS_Init(-1, 44100, 0, win, NULL)) { 154 | Error("Can't initialize device"); 155 | EndDialog(h, 0); 156 | break; 157 | } 158 | memset(&ofn, 0, sizeof(ofn)); 159 | ofn.lStructSize = sizeof(ofn); 160 | ofn.hwndOwner = h; 161 | ofn.nMaxFile = MAX_PATH; 162 | ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER; 163 | ofn.lpstrFilter = "MOD music files (mo3/xm/mod/s3m/it/mtm/umx)\0*.mo3;*.xm;*.mod;*.s3m;*.it;*.mtm;*.umx\0All files\0*.*\0\0"; 164 | MESS(21, CB_ADDSTRING, 0, "off"); 165 | MESS(21, CB_ADDSTRING, 0, "linear"); 166 | MESS(21, CB_ADDSTRING, 0, "sinc"); 167 | MESS(21, CB_SETCURSEL, 1, 0); 168 | MESS(22, CB_ADDSTRING, 0, "off"); 169 | MESS(22, CB_ADDSTRING, 0, "normal"); 170 | MESS(22, CB_ADDSTRING, 0, "sensitive"); 171 | MESS(22, CB_SETCURSEL, 2, 0); 172 | MESS(23, CB_ADDSTRING, 0, "off"); 173 | MESS(23, CB_ADDSTRING, 0, "mode1"); 174 | MESS(23, CB_ADDSTRING, 0, "mode2"); 175 | MESS(23, CB_SETCURSEL, 0, 0); 176 | SetTimer(win, 1, 100, NULL); 177 | return 1; 178 | 179 | case WM_DESTROY: 180 | BASS_Free(); 181 | break; 182 | } 183 | 184 | return 0; 185 | } 186 | 187 | int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 188 | { 189 | // check the correct BASS was loaded 190 | if (HIWORD(BASS_GetVersion()) != BASSVERSION) { 191 | MessageBox(0, "An incorrect version of BASS.DLL was loaded", 0, MB_ICONERROR); 192 | return 0; 193 | } 194 | 195 | { 196 | INITCOMMONCONTROLSEX cc = { sizeof(cc), ICC_BAR_CLASSES }; 197 | InitCommonControlsEx(&cc); 198 | } 199 | 200 | DialogBox(hInstance, MAKEINTRESOURCE(1000), NULL, DialogProc); 201 | 202 | return 0; 203 | } 204 | -------------------------------------------------------------------------------- /Source/bass/c/modtest/modtest.rc: -------------------------------------------------------------------------------- 1 | #include "windows.h" 2 | 3 | 1000 DIALOG DISCARDABLE 100, 100, 200, 88 4 | STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 5 | CAPTION "BASS MOD music example" 6 | FONT 8, "MS Sans Serif" 7 | BEGIN 8 | PUSHBUTTON "Open file...",10,5,5,190,14 9 | CTEXT "",11,5,21,190,8 10 | CTEXT "",15,20,34,45,10,SS_SUNKEN 11 | PUSHBUTTON "Play / Pause",12,120,33,60,12 12 | CONTROL "Slider1",20,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | 13 | WS_TABSTOP,5,48,190,12 14 | CTEXT "Interpolation",-1,22,61,45,8 15 | COMBOBOX 21,22,70,45,70,CBS_DROPDOWNLIST | WS_VSCROLL | 16 | WS_TABSTOP 17 | CTEXT "Ramping",-1,77,61,45,8 18 | COMBOBOX 22,77,70,45,70,CBS_DROPDOWNLIST | WS_VSCROLL | 19 | WS_TABSTOP 20 | CTEXT "Surround",-1,132,61,45,8 21 | COMBOBOX 23,132,70,45,70,CBS_DROPDOWNLIST | WS_VSCROLL | 22 | WS_TABSTOP 23 | END 24 | -------------------------------------------------------------------------------- /Source/bass/c/modtest/modtest.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {9465CD7D-3DAC-472F-AA85-DD144AC094F7} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;comctl32.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Windows 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;comctl32.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Windows 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Source/bass/c/multi/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = multi.exe 4 | FLAGS += -mwindows 5 | LIBS += -lcomdlg32 6 | 7 | all: $(TARGET) 8 | 9 | clean: 10 | $(RM) $(OUTDIR)\$(TARGET) 11 | -------------------------------------------------------------------------------- /Source/bass/c/multi/multi.c: -------------------------------------------------------------------------------- 1 | /* 2 | BASS multiple output example 3 | Copyright (c) 2001-2021 Un4seen Developments Ltd. 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #include "bass.h" 11 | 12 | HWND win; 13 | 14 | DWORD outdev[2]; // output devices 15 | DWORD chan[2]; // channel handles 16 | 17 | // display error messages 18 | void Error(const char *es) 19 | { 20 | char mes[200]; 21 | sprintf(mes, "%s\n(error code: %d)", es, BASS_ErrorGetCode()); 22 | MessageBox(win, mes, 0, 0); 23 | } 24 | 25 | // Cloning DSP function 26 | void CALLBACK CloneDSP(HDSP handle, DWORD channel, void *buffer, DWORD length, void *user) 27 | { 28 | BASS_StreamPutData((HSTREAM)user, buffer, length); // user = clone 29 | } 30 | 31 | #define MESS(id,m,w,l) SendDlgItemMessage(win,id,m,(WPARAM)(w),(LPARAM)(l)) 32 | 33 | INT_PTR CALLBACK DialogProc(HWND h, UINT m, WPARAM w, LPARAM l) 34 | { 35 | static OPENFILENAME ofn; 36 | 37 | switch (m) { 38 | case WM_COMMAND: 39 | switch (LOWORD(w)) { 40 | case IDCANCEL: 41 | EndDialog(h, 0); 42 | break; 43 | 44 | case 10: // open a file to play on device #1 45 | case 11: // open a file to play on device #2 46 | { 47 | int devn = LOWORD(w) - 10; 48 | char file[MAX_PATH] = ""; 49 | ofn.lpstrFile = file; 50 | if (GetOpenFileName(&ofn)) { 51 | BASS_ChannelFree(chan[devn]); // free the old channel 52 | BASS_SetDevice(outdev[devn]); // set the device to create new channel on 53 | if (!(chan[devn] = BASS_StreamCreateFile(FALSE, file, 0, 0, BASS_SAMPLE_LOOP | BASS_SAMPLE_FLOAT)) 54 | && !(chan[devn] = BASS_MusicLoad(FALSE, file, 0, 0, BASS_MUSIC_RAMPS | BASS_SAMPLE_LOOP | BASS_SAMPLE_FLOAT, 1))) { 55 | MESS(10 + devn, WM_SETTEXT, 0, "Open file..."); 56 | Error("Can't play the file"); 57 | break; 58 | } 59 | MESS(10 + devn, WM_SETTEXT, 0, strrchr(file, '\\') + 1); 60 | BASS_ChannelPlay(chan[devn], FALSE); 61 | } 62 | } 63 | break; 64 | 65 | case 15: // clone on device #1 66 | case 16: // clone on device #2 67 | { 68 | int devn = LOWORD(w) - 15; 69 | BASS_CHANNELINFO chaninfo; 70 | if (!BASS_ChannelGetInfo(chan[devn ^ 1], &chaninfo)) { 71 | Error("Nothing to clone"); 72 | break; 73 | } 74 | BASS_ChannelFree(chan[devn]); // free the old channel 75 | BASS_SetDevice(outdev[devn]); // set the device to create clone on 76 | if (!(chan[devn] = BASS_StreamCreate(chaninfo.freq, chaninfo.chans, chaninfo.flags, STREAMPROC_PUSH, 0))) { // create a "push" stream 77 | MESS(10 + devn, WM_SETTEXT, 0, "Open file..."); 78 | Error("Can't create clone"); 79 | } else { 80 | BASS_INFO info; 81 | BASS_GetInfo(&info); // get latency info 82 | BASS_ChannelLock(chan[devn ^ 1], TRUE); // lock source stream to synchonise buffer contents 83 | BASS_ChannelSetDSP(chan[devn ^ 1], CloneDSP, (void*)chan[devn], 0); // set DSP to feed data to clone 84 | { // copy buffered data to clone 85 | DWORD d = BASS_ChannelSeconds2Bytes(chan[devn], info.latency / 1000.f); // playback delay 86 | DWORD c = BASS_ChannelGetData(chan[devn ^ 1], 0, BASS_DATA_AVAILABLE); 87 | BYTE *buf = (BYTE*)malloc(c); 88 | c = BASS_ChannelGetData(chan[devn ^ 1], buf, c); 89 | if (c > d) BASS_StreamPutData(chan[devn], buf + d, c - d); 90 | free(buf); 91 | } 92 | BASS_ChannelLock(chan[devn ^ 1], FALSE); // unlock source stream 93 | BASS_ChannelPlay(chan[devn], FALSE); // play clone 94 | MESS(10 + devn, WM_SETTEXT, 0, "clone"); 95 | } 96 | } 97 | break; 98 | 99 | case 30: // swap channel devices 100 | { 101 | { // swap handles 102 | HSTREAM temp = chan[0]; 103 | chan[0] = chan[1]; 104 | chan[1] = temp; 105 | } 106 | { // swap text 107 | char temp1[MAX_PATH], temp2[MAX_PATH]; 108 | MESS(10, WM_GETTEXT, MAX_PATH, temp1); 109 | MESS(11, WM_GETTEXT, MAX_PATH, temp2); 110 | MESS(10, WM_SETTEXT, 0, temp2); 111 | MESS(11, WM_SETTEXT, 0, temp1); 112 | } 113 | // update the channel devices 114 | BASS_ChannelSetDevice(chan[0], outdev[0]); 115 | BASS_ChannelSetDevice(chan[1], outdev[1]); 116 | } 117 | break; 118 | } 119 | break; 120 | 121 | case WM_INITDIALOG: 122 | win = h; 123 | memset(&ofn, 0, sizeof(ofn)); 124 | ofn.lStructSize = sizeof(ofn); 125 | ofn.hwndOwner = h; 126 | ofn.nMaxFile = MAX_PATH; 127 | ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER; 128 | ofn.lpstrFilter = "Playable files\0*.mo3;*.xm;*.mod;*.s3m;*.it;*.mtm;*.umx;*.mp3;*.mp2;*.mp1;*.ogg;*.wav;*.aif\0All files\0*.*\0\0"; 129 | // initialize the chosen output devices 130 | if (!BASS_Init(outdev[0], 44100, 0, win, NULL)) { 131 | Error("Can't initialize device 1"); 132 | EndDialog(h, 0); 133 | } 134 | if (!BASS_Init(outdev[1], 44100, 0, win, NULL)) { 135 | Error("Can't initialize device 2"); 136 | EndDialog(h, 0); 137 | } 138 | { 139 | BASS_DEVICEINFO info; 140 | BASS_GetDeviceInfo(outdev[0], &info); 141 | MESS(20, WM_SETTEXT, 0, info.name); 142 | BASS_GetDeviceInfo(outdev[1], &info); 143 | MESS(21, WM_SETTEXT, 0, info.name); 144 | } 145 | return 1; 146 | 147 | case WM_DESTROY: 148 | // release both devices 149 | BASS_SetDevice(outdev[0]); 150 | BASS_Free(); 151 | BASS_SetDevice(outdev[1]); 152 | BASS_Free(); 153 | break; 154 | } 155 | 156 | return 0; 157 | } 158 | 159 | INT_PTR CALLBACK DeviceDialogProc(HWND h, UINT m, WPARAM w, LPARAM l) 160 | { 161 | switch (m) { 162 | case WM_COMMAND: 163 | switch (LOWORD(w)) { 164 | case 10: 165 | if (HIWORD(w) != LBN_DBLCLK) break; 166 | case IDOK: 167 | { 168 | int device = SendDlgItemMessage(h, 10, LB_GETCURSEL, 0, 0); 169 | device = SendDlgItemMessage(h, 10, LB_GETITEMDATA, device, 0); // get device # 170 | EndDialog(h, device); 171 | } 172 | break; 173 | } 174 | break; 175 | 176 | case WM_INITDIALOG: 177 | { 178 | char text[30]; 179 | BASS_DEVICEINFO i; 180 | int c; 181 | sprintf(text, "Select output device #%d", l); 182 | SetWindowText(h, text); 183 | for (c = 1; BASS_GetDeviceInfo(c, &i); c++) { // device 1 = 1st real device 184 | if (i.flags & BASS_DEVICE_ENABLED) { // enabled, so add it... 185 | int idx = SendDlgItemMessage(h, 10, LB_ADDSTRING, 0, (LPARAM)i.name); 186 | SendDlgItemMessage(h, 10, LB_SETITEMDATA, idx, c); // store device # 187 | } 188 | } 189 | SendDlgItemMessage(h, 10, LB_SETCURSEL, 0, 0); 190 | } 191 | return 1; 192 | } 193 | return 0; 194 | } 195 | 196 | int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 197 | { 198 | // check the correct BASS was loaded 199 | if (HIWORD(BASS_GetVersion()) != BASSVERSION) { 200 | MessageBox(0, "An incorrect version of BASS.DLL was loaded", 0, MB_ICONERROR); 201 | return 0; 202 | } 203 | 204 | // let the user choose the output devices 205 | outdev[0] = DialogBoxParam(hInstance, MAKEINTRESOURCE(2000), NULL, DeviceDialogProc, 1); 206 | outdev[1] = DialogBoxParam(hInstance, MAKEINTRESOURCE(2000), NULL, DeviceDialogProc, 2); 207 | 208 | DialogBox(hInstance, MAKEINTRESOURCE(1000), NULL, DialogProc); 209 | 210 | return 0; 211 | } 212 | 213 | -------------------------------------------------------------------------------- /Source/bass/c/multi/multi.rc: -------------------------------------------------------------------------------- 1 | #include "windows.h" 2 | 3 | 1000 DIALOG DISCARDABLE 100, 100, 260, 68 4 | STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 5 | CAPTION "BASS multiple output example" 6 | FONT 8, "MS Sans Serif" 7 | BEGIN 8 | GROUPBOX "",20,5,2,250,29 9 | PUSHBUTTON "Open file...",10,10,11,180,14 10 | GROUPBOX "",21,5,35,250,29 11 | PUSHBUTTON "Open file...",11,10,44,180,14 12 | PUSHBUTTON "clone #2",15,195,11,40,14 13 | PUSHBUTTON "clone #1",16,195,44,40,14 14 | PUSHBUTTON "swap",30,225,27,25,14 15 | END 16 | 17 | 2000 DIALOG DISCARDABLE 115, 100, 170, 60 18 | STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION 19 | FONT 8, "MS Sans Serif" 20 | BEGIN 21 | LISTBOX 10,5,5,160,35,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | 22 | WS_TABSTOP 23 | DEFPUSHBUTTON "OK",IDOK,100,44,60,12 24 | END 25 | 26 | -------------------------------------------------------------------------------- /Source/bass/c/multi/multi.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {305E5C8D-85DB-4E36-A82E-856BC9972413} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Windows 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Windows 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Source/bass/c/netradio/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = netradio.exe 4 | FLAGS += -mwindows 5 | 6 | all: $(TARGET) 7 | 8 | clean: 9 | $(RM) $(OUTDIR)\$(TARGET) 10 | -------------------------------------------------------------------------------- /Source/bass/c/netradio/netradio.c: -------------------------------------------------------------------------------- 1 | /* 2 | BASS internet radio example 3 | Copyright (c) 2002-2021 Un4seen Developments Ltd. 4 | */ 5 | 6 | #include 7 | #include 8 | #include "bass.h" 9 | 10 | // HLS definitions (copied from BASSHLS.H) 11 | #define BASS_SYNC_HLS_SEGMENT 0x10300 12 | #define BASS_TAG_HLS_EXTINF 0x14000 13 | 14 | HWND win; 15 | CRITICAL_SECTION lock; 16 | DWORD req; // request number/counter 17 | HSTREAM chan; // stream handle 18 | 19 | const char *urls[10] = { // preset stream URLs 20 | "http://stream-dc1.radioparadise.com/rp_192m.ogg", "http://www.radioparadise.com/m3u/mp3-32.m3u", 21 | "http://somafm.com/secretagent.pls", "http://somafm.com/secretagent32.pls", 22 | "http://somafm.com/suburbsofgoa.pls", "http://somafm.com/suburbsofgoa32.pls", 23 | "http://bassdrive.com/bassdrive.m3u", "http://bassdrive.com/bassdrive3.m3u", 24 | "http://sc6.radiocaroline.net:8040/listen.pls", "http://sc2.radiocaroline.net:8010/listen.pls" 25 | }; 26 | 27 | // display error messages 28 | void Error(const char *es) 29 | { 30 | char mes[200]; 31 | sprintf(mes, "%s\n(error code: %d)", es, BASS_ErrorGetCode()); 32 | MessageBox(win, mes, 0, 0); 33 | } 34 | 35 | #define MESS(id,m,w,l) SendDlgItemMessage(win,id,m,(WPARAM)(w),(LPARAM)(l)) 36 | 37 | // update stream title from metadata 38 | void DoMeta() 39 | { 40 | const char *meta = BASS_ChannelGetTags(chan, BASS_TAG_META); 41 | if (meta) { // got Shoutcast metadata 42 | const char *p = strstr(meta, "StreamTitle='"); // locate the title 43 | if (p) { 44 | const char *p2 = strstr(p, "';"); // locate the end of it 45 | if (p2) { 46 | char *t = strdup(p + 13); 47 | t[p2 - (p + 13)] = 0; 48 | MESS(30, WM_SETTEXT, 0, t); 49 | free(t); 50 | } 51 | } 52 | } else { 53 | meta = BASS_ChannelGetTags(chan, BASS_TAG_OGG); 54 | if (meta) { // got Icecast/OGG tags 55 | const char *artist = NULL, *title = NULL, *p = meta; 56 | for (; *p; p += strlen(p) + 1) { 57 | if (!strnicmp(p, "artist=", 7)) // found the artist 58 | artist = p + 7; 59 | if (!strnicmp(p, "title=", 6)) // found the title 60 | title = p + 6; 61 | } 62 | if (title) { 63 | if (artist) { 64 | char text[100]; 65 | _snprintf(text, sizeof(text), "%s - %s", artist, title); 66 | MESS(30, WM_SETTEXT, 0, text); 67 | } else 68 | MESS(30, WM_SETTEXT, 0, title); 69 | } 70 | } else { 71 | meta = BASS_ChannelGetTags(chan, BASS_TAG_HLS_EXTINF); 72 | if (meta) { // got HLS segment info 73 | const char *p = strchr(meta, ','); 74 | if (p) MESS(30, WM_SETTEXT, 0, p + 1); 75 | } 76 | } 77 | } 78 | } 79 | 80 | void CALLBACK MetaSync(HSYNC handle, DWORD channel, DWORD data, void *user) 81 | { 82 | DoMeta(); 83 | } 84 | 85 | void CALLBACK StallSync(HSYNC handle, DWORD channel, DWORD data, void *user) 86 | { 87 | if (!data) // stalled 88 | SetTimer(win, 0, 50, 0); // start buffer monitoring 89 | } 90 | 91 | void CALLBACK FreeSync(HSYNC handle, DWORD channel, DWORD data, void *user) 92 | { 93 | chan = 0; 94 | MESS(31, WM_SETTEXT, 0, "not playing"); 95 | MESS(30, WM_SETTEXT, 0, ""); 96 | MESS(32, WM_SETTEXT, 0, ""); 97 | } 98 | 99 | void CALLBACK StatusProc(const void *buffer, DWORD length, void *user) 100 | { 101 | if (buffer && !length && (DWORD)user == req) // got HTTP/ICY tags, and this is still the current request 102 | MESS(32, WM_SETTEXT, 0, buffer); // display status 103 | } 104 | 105 | DWORD WINAPI OpenURL(void *url) 106 | { 107 | DWORD c, r; 108 | EnterCriticalSection(&lock); // make sure only 1 thread at a time can do the following 109 | r = ++req; // increment the request counter for this request 110 | LeaveCriticalSection(&lock); 111 | if (chan) BASS_StreamFree(chan); // close old stream 112 | MESS(31, WM_SETTEXT, 0, "connecting..."); 113 | MESS(30, WM_SETTEXT, 0, ""); 114 | MESS(32, WM_SETTEXT, 0, ""); 115 | c = BASS_StreamCreateURL(url, 0, BASS_STREAM_BLOCK | BASS_STREAM_STATUS | BASS_STREAM_AUTOFREE | BASS_SAMPLE_FLOAT, StatusProc, (void*)r); // open URL 116 | free(url); // free temp URL buffer 117 | EnterCriticalSection(&lock); 118 | if (r != req) { // there is a newer request, discard this stream 119 | LeaveCriticalSection(&lock); 120 | if (c) BASS_StreamFree(c); 121 | return 0; 122 | } 123 | chan = c; // this is now the current stream 124 | LeaveCriticalSection(&lock); 125 | if (!chan) { // failed to open 126 | MESS(31, WM_SETTEXT, 0, "not playing"); 127 | Error("Can't play the stream"); 128 | } else { 129 | // set syncs for stream title updates 130 | BASS_ChannelSetSync(chan, BASS_SYNC_META, 0, MetaSync, 0); // Shoutcast 131 | BASS_ChannelSetSync(chan, BASS_SYNC_OGG_CHANGE, 0, MetaSync, 0); // Icecast/OGG 132 | BASS_ChannelSetSync(chan, BASS_SYNC_HLS_SEGMENT, 0, MetaSync, 0); // HLS 133 | // set sync for stalling/buffering 134 | BASS_ChannelSetSync(chan, BASS_SYNC_STALL, 0, StallSync, 0); 135 | // set sync for end of stream (when freed due to AUTOFREE) 136 | BASS_ChannelSetSync(chan, BASS_SYNC_FREE, 0, FreeSync, 0); 137 | // play it! 138 | BASS_ChannelPlay(chan, FALSE); 139 | // start buffer monitoring (and display stream info when done) 140 | SetTimer(win, 0, 50, 0); 141 | } 142 | return 0; 143 | } 144 | 145 | INT_PTR CALLBACK DialogProc(HWND h, UINT m, WPARAM w, LPARAM l) 146 | { 147 | switch (m) { 148 | case WM_TIMER: 149 | { // monitor buffering progress 150 | DWORD active = BASS_ChannelIsActive(chan); 151 | if (active == BASS_ACTIVE_STALLED) { 152 | char text[32]; 153 | sprintf(text, "buffering... %d%%", 100 - (int)BASS_StreamGetFilePosition(chan, BASS_FILEPOS_BUFFERING)); 154 | MESS(31, WM_SETTEXT, 0, text); 155 | break; 156 | } else { 157 | KillTimer(win, 0); // finished buffering, stop monitoring 158 | if (active) { 159 | MESS(31, WM_SETTEXT, 0, "playing"); 160 | { // get the stream name and URL 161 | const char *icy = BASS_ChannelGetTags(chan, BASS_TAG_ICY); 162 | if (!icy) icy = BASS_ChannelGetTags(chan, BASS_TAG_HTTP); // no ICY tags, try HTTP 163 | if (icy) { 164 | for (; *icy; icy += strlen(icy) + 1) { 165 | if (!strnicmp(icy, "icy-name:", 9)) 166 | MESS(31, WM_SETTEXT, 0, icy + 9); 167 | if (!strnicmp(icy, "icy-url:", 8)) 168 | MESS(32, WM_SETTEXT, 0, icy + 8); 169 | } 170 | } 171 | } 172 | // get the stream title 173 | DoMeta(); 174 | } 175 | } 176 | } 177 | break; 178 | 179 | case WM_COMMAND: 180 | switch (LOWORD(w)) { 181 | case IDCANCEL: 182 | EndDialog(h, 0); 183 | break; 184 | 185 | default: 186 | if ((LOWORD(w) >= 10 && LOWORD(w) < 20) || LOWORD(w) == 21) { 187 | char *url; 188 | if (LOWORD(w) == 21) { // custom stream URL 189 | char temp[200]; 190 | MESS(20, WM_GETTEXT, sizeof(temp), temp); 191 | url = strdup(temp); 192 | } else // preset 193 | url = strdup(urls[LOWORD(w) - 10]); 194 | if (MESS(41, BM_GETCHECK, 0, 0)) 195 | BASS_SetConfigPtr(BASS_CONFIG_NET_PROXY, NULL); // disable proxy 196 | else { 197 | char proxy[100]; 198 | GetDlgItemText(win, 40, proxy, sizeof(proxy) - 1); 199 | proxy[sizeof(proxy) - 1] = 0; 200 | BASS_SetConfigPtr(BASS_CONFIG_NET_PROXY, proxy); // set proxy server 201 | } 202 | // open URL in a new thread (so that main thread is free) 203 | CloseHandle(CreateThread(NULL, 0, OpenURL, url, 0, NULL)); 204 | } 205 | } 206 | break; 207 | 208 | case WM_INITDIALOG: 209 | win = h; 210 | // initialize default output device 211 | if (!BASS_Init(-1, 44100, 0, win, NULL)) { 212 | Error("Can't initialize device"); 213 | EndDialog(win, 0); 214 | break; 215 | } 216 | BASS_PluginLoad("bass_aac.dll", 0); // load BASS_AAC (if present) for AAC support on older Windows 217 | BASS_PluginLoad("bassflac.dll", 0); // load BASSFLAC (if present) for FLAC support 218 | BASS_PluginLoad("basshls.dll", 0); // load BASSHLS (if present) for HLS support 219 | InitializeCriticalSection(&lock); 220 | MESS(20, WM_SETTEXT, 0, "http://"); 221 | return 1; 222 | 223 | case WM_DESTROY: 224 | BASS_Free(); 225 | BASS_PluginFree(0); 226 | break; 227 | } 228 | 229 | return 0; 230 | } 231 | 232 | int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 233 | { 234 | // check the correct BASS was loaded 235 | if (HIWORD(BASS_GetVersion()) != BASSVERSION) { 236 | MessageBox(0, "An incorrect version of BASS.DLL was loaded", 0, MB_ICONERROR); 237 | return 0; 238 | } 239 | 240 | BASS_SetConfig(BASS_CONFIG_NET_PLAYLIST, 1); // enable playlist processing 241 | 242 | DialogBox(hInstance, MAKEINTRESOURCE(1000), NULL, DialogProc); 243 | 244 | return 0; 245 | } 246 | -------------------------------------------------------------------------------- /Source/bass/c/netradio/netradio.rc: -------------------------------------------------------------------------------- 1 | #include "windows.h" 2 | 3 | 1000 DIALOG DISCARDABLE 200, 50, 195, 185 4 | STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 5 | CAPTION "BASS internet radio example" 6 | FONT 8, "MS Sans Serif" 7 | BEGIN 8 | GROUPBOX "Presets",-1,5,2,185,45 9 | LTEXT "High bitrate",-1,10,15,48,8 10 | LTEXT "Low bitrate",-1,10,30,48,8 11 | PUSHBUTTON "1",10,60,11,20,15 12 | PUSHBUTTON "1",11,60,27,20,15 13 | PUSHBUTTON "2",12,86,11,20,15 14 | PUSHBUTTON "2",13,86,27,20,15 15 | PUSHBUTTON "3",14,112,11,20,15 16 | PUSHBUTTON "3",15,112,27,20,15 17 | PUSHBUTTON "4",16,138,11,20,15 18 | PUSHBUTTON "4",17,138,27,20,15 19 | PUSHBUTTON "5",18,164,11,20,15 20 | PUSHBUTTON "5",19,164,27,20,15 21 | GROUPBOX "Custom",-1,5,50,185,28 22 | EDITTEXT 20,10,60,145,12,ES_AUTOHSCROLL 23 | PUSHBUTTON "open",21,160,60,25,12 24 | GROUPBOX "Currently playing",-1,5,81,185,57 25 | CTEXT "",30,10,91,175,16,SS_NOPREFIX 26 | CTEXT "not playing",31,10,109,175,16,SS_NOPREFIX 27 | CTEXT "",32,10,127,175,8,SS_NOPREFIX 28 | GROUPBOX "Proxy server",-1,5,141,185,40 29 | EDITTEXT 40,10,151,175,12,ES_AUTOHSCROLL 30 | LTEXT "[user:pass@]server:port",-1,109,165,76,8 31 | CONTROL "Direct connection",41,"Button",BS_AUTOCHECKBOX | 32 | WS_TABSTOP,15,167,72,10 33 | END 34 | -------------------------------------------------------------------------------- /Source/bass/c/netradio/netradio.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {DFA5AC9E-4073-4555-92E8-E4808EE32B43} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Windows 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Windows 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Source/bass/c/plugins/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = plugins.exe 4 | FLAGS += -mwindows 5 | LIBS += -lcomdlg32 -lcomctl32 6 | 7 | all: $(TARGET) 8 | 9 | clean: 10 | $(RM) $(OUTDIR)\$(TARGET) 11 | -------------------------------------------------------------------------------- /Source/bass/c/plugins/plugins.c: -------------------------------------------------------------------------------- 1 | /* 2 | BASS plugins example 3 | Copyright (c) 2005-2021 Un4seen Developments Ltd. 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "bass.h" 11 | 12 | HWND win; 13 | 14 | DWORD chan; // channel handle 15 | 16 | OPENFILENAME ofn; 17 | char filter[2000]; 18 | 19 | // display error messages 20 | void Error(const char *es) 21 | { 22 | char mes[200]; 23 | sprintf(mes, "%s\n(error code: %d)", es, BASS_ErrorGetCode()); 24 | MessageBox(win, mes, 0, 0); 25 | } 26 | 27 | // translate a CTYPE value to text 28 | const char *GetCTypeString(DWORD ctype, HPLUGIN plugin) 29 | { 30 | if (plugin) { // using a plugin 31 | const BASS_PLUGININFO *pinfo = BASS_PluginGetInfo(plugin); // get plugin info 32 | int a; 33 | for (a = 0; a < pinfo->formatc; a++) { 34 | if (pinfo->formats[a].ctype == ctype) // found a "ctype" match... 35 | return pinfo->formats[a].name; // return its name 36 | } 37 | } 38 | // check built-in stream formats... 39 | if (ctype == BASS_CTYPE_STREAM_OGG) return "Ogg Vorbis"; 40 | if (ctype == BASS_CTYPE_STREAM_MP1) return "MPEG layer 1"; 41 | if (ctype == BASS_CTYPE_STREAM_MP2) return "MPEG layer 2"; 42 | if (ctype == BASS_CTYPE_STREAM_MP3) return "MPEG layer 3"; 43 | if (ctype == BASS_CTYPE_STREAM_AIFF) return "Audio IFF"; 44 | if (ctype == BASS_CTYPE_STREAM_WAV_PCM) return "PCM WAVE"; 45 | if (ctype == BASS_CTYPE_STREAM_WAV_FLOAT) return "Floating-point WAVE"; 46 | if (ctype == BASS_CTYPE_STREAM_MF) { // a Media Foundation codec, check the format... 47 | const WAVEFORMATEX *wf = (const WAVEFORMATEX*)BASS_ChannelGetTags(chan, BASS_TAG_WAVEFORMAT); 48 | if (wf->wFormatTag == 0x1610) return "Advanced Audio Coding"; 49 | if (wf->wFormatTag >= 0x0160 && wf->wFormatTag <= 0x0163) return "Windows Media Audio"; 50 | } 51 | if (ctype & BASS_CTYPE_STREAM_WAV) // other WAVE codec, could use acmFormatTagDetails to get its name, but for now... 52 | return "WAVE"; 53 | return "?"; 54 | } 55 | 56 | #define MESS(id,m,w,l) SendDlgItemMessage(win,id,m,(WPARAM)(w),(LPARAM)(l)) 57 | 58 | INT_PTR CALLBACK DialogProc(HWND h, UINT m, WPARAM w, LPARAM l) 59 | { 60 | switch (m) { 61 | case WM_COMMAND: 62 | switch (LOWORD(w)) { 63 | case IDCANCEL: 64 | EndDialog(h, 0); 65 | break; 66 | 67 | case 10: 68 | { 69 | char file[MAX_PATH] = ""; 70 | ofn.lpstrFile = file; 71 | ofn.nMaxFile = MAX_PATH; 72 | if (GetOpenFileName(&ofn)) { 73 | BASS_StreamFree(chan); // free the old stream 74 | if (!(chan = BASS_StreamCreateFile(FALSE, file, 0, 0, BASS_SAMPLE_LOOP | BASS_SAMPLE_FLOAT))) { 75 | MESS(10, WM_SETTEXT, 0, "Open file..."); 76 | MESS(11, WM_SETTEXT, 0, ""); 77 | MESS(13, WM_SETTEXT, 0, ""); 78 | MESS(12, TBM_SETRANGEMAX, 1, 0); 79 | Error("Can't play the file"); 80 | break; 81 | } 82 | MESS(10, WM_SETTEXT, 0, strrchr(file, '\\') + 1); 83 | { // display the file type 84 | BASS_CHANNELINFO info; 85 | BASS_ChannelGetInfo(chan, &info); 86 | sprintf(file, "channel type = %x (%s)", info.ctype, GetCTypeString(info.ctype, info.plugin)); 87 | MESS(11, WM_SETTEXT, 0, file); 88 | } 89 | { // update scroller range 90 | QWORD len = BASS_ChannelGetLength(chan, BASS_POS_BYTE); 91 | if (len == -1) len = 0; // unknown length 92 | MESS(12, TBM_SETRANGEMAX, 1, BASS_ChannelBytes2Seconds(chan, len) * 1000); 93 | } 94 | BASS_ChannelPlay(chan, FALSE); 95 | } 96 | } 97 | break; 98 | } 99 | break; 100 | 101 | case WM_HSCROLL: 102 | if (l && LOWORD(w) != SB_THUMBPOSITION && LOWORD(w) != SB_ENDSCROLL) { // set the position 103 | int pos = SendMessage((HWND)l, TBM_GETPOS, 0, 0); 104 | BASS_ChannelSetPosition(chan, BASS_ChannelSeconds2Bytes(chan, pos / 1000.0), BASS_POS_BYTE); 105 | } 106 | break; 107 | 108 | case WM_TIMER: 109 | if (chan) { 110 | char text[64]; 111 | double len = BASS_ChannelBytes2Seconds(chan, BASS_ChannelGetLength(chan, BASS_POS_BYTE)); 112 | double pos = BASS_ChannelBytes2Seconds(chan, BASS_ChannelGetPosition(chan, BASS_POS_BYTE)); 113 | sprintf(text, "%u:%02u / %u:%02u", (int)pos / 60, (int)pos % 60, (int)len / 60, (int)len % 60); 114 | MESS(13, WM_SETTEXT, 0, text); 115 | MESS(12, TBM_SETPOS, 1, pos * 1000); 116 | } 117 | break; 118 | 119 | case WM_INITDIALOG: 120 | win = h; 121 | // initialize default output device 122 | if (!BASS_Init(-1, 44100, 0, win, NULL)) { 123 | Error("Can't initialize device"); 124 | EndDialog(h, 0); 125 | break; 126 | } 127 | // initialize file selector 128 | memset(&ofn, 0, sizeof(ofn)); 129 | ofn.lStructSize = sizeof(ofn); 130 | ofn.hwndOwner = h; 131 | ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER; 132 | ofn.lpstrFilter = filter; 133 | memcpy(filter, "BASS built-in formats (*.mp3;*.mp2;*.mp1;*.ogg;*.wav;*.aif)\0*.mp3;*.mp2;*.mp1;*.ogg;*.wav;*.aif\0", 96); 134 | { // look for plugins (in the executable's directory) 135 | WIN32_FIND_DATA fd; 136 | HANDLE fh; 137 | char path[MAX_PATH], *fp = filter + 96; 138 | GetModuleFileName(0, path, sizeof(path)); 139 | strcpy(strrchr(path, '\\') + 1, "bass*.dll"); 140 | fh = FindFirstFile(path, &fd); 141 | if (fh != INVALID_HANDLE_VALUE) { 142 | do { 143 | HPLUGIN plug = BASS_PluginLoad(fd.cFileName, 0); 144 | if (plug) { // plugin loaded 145 | // get plugin info to add to the file selector filter 146 | const BASS_PLUGININFO *pinfo = BASS_PluginGetInfo(plug); 147 | int a; 148 | for (a = 0; a < pinfo->formatc; a++) { 149 | fp += sprintf(fp, "%s (%s) - %s", pinfo->formats[a].name, pinfo->formats[a].exts, fd.cFileName) + 1; // format description 150 | fp += sprintf(fp, "%s", pinfo->formats[a].exts) + 1; // extension filter 151 | } 152 | // add plugin to the list 153 | MESS(20, LB_ADDSTRING, 0, fd.cFileName); 154 | } 155 | } while (FindNextFile(fh, &fd)); 156 | FindClose(fh); 157 | } 158 | if (!MESS(20, LB_GETCOUNT, 0, 0)) 159 | MESS(20, LB_ADDSTRING, 0, "no plugins - visit the BASS webpage to get some"); 160 | // check if Media Foundation is available 161 | if (!BASS_GetConfig(BASS_CONFIG_MF_DISABLE)) { 162 | fp += sprintf(fp, "Media Foundation formats (*.aac;*.m4a;*.mp4;*.wma)") + 1; 163 | fp += sprintf(fp, "*.aac;*.m4a;*.mp4;*.wma") + 1; 164 | } 165 | memcpy(fp, "All files\0*.*\0\0", 15); 166 | } 167 | MESS(12, TBM_SETLINESIZE, 0, 1000); 168 | SetTimer(h, 0, 100, 0); // timer to update the position display 169 | return 1; 170 | 171 | case WM_DESTROY: 172 | BASS_Free(); 173 | BASS_PluginFree(0); // unload all plugins 174 | break; 175 | } 176 | 177 | return 0; 178 | } 179 | 180 | int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 181 | { 182 | // check the correct BASS was loaded 183 | if (HIWORD(BASS_GetVersion()) != BASSVERSION) { 184 | MessageBox(0, "An incorrect version of BASS.DLL was loaded", 0, MB_ICONERROR); 185 | return 0; 186 | } 187 | 188 | { 189 | INITCOMMONCONTROLSEX cc = { sizeof(cc), ICC_BAR_CLASSES }; 190 | InitCommonControlsEx(&cc); 191 | } 192 | 193 | DialogBox(hInstance, MAKEINTRESOURCE(1000), NULL, DialogProc); 194 | 195 | return 0; 196 | } 197 | -------------------------------------------------------------------------------- /Source/bass/c/plugins/plugins.rc: -------------------------------------------------------------------------------- 1 | #include "windows.h" 2 | 3 | 1000 DIALOG DISCARDABLE 100, 100, 200, 123 4 | STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 5 | CAPTION "BASS plugins example" 6 | FONT 8, "MS Sans Serif" 7 | BEGIN 8 | PUSHBUTTON "Open file...",10,5,67,190,14 9 | GROUPBOX "Loaded plugins",-1,5,3,190,59 10 | LISTBOX 20,10,13,180,43,LBS_SORT | LBS_NOINTEGRALHEIGHT | 11 | LBS_NOSEL | WS_VSCROLL 12 | CTEXT "",11,10,85,180,8 13 | CONTROL "Slider1",12,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | 14 | WS_TABSTOP,15,96,170,15 15 | CTEXT "",13,10,111,180,8 16 | END 17 | -------------------------------------------------------------------------------- /Source/bass/c/plugins/plugins.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {9465CD7D-3DAC-472F-AA85-DD144AC094F0} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;comctl32.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Windows 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;comctl32.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Windows 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Source/bass/c/rectest/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = rectest.exe 4 | FLAGS += -mwindows 5 | LIBS += -lcomdlg32 -lcomctl32 6 | 7 | all: $(TARGET) 8 | 9 | clean: 10 | $(RM) $(OUTDIR)\$(TARGET) 11 | -------------------------------------------------------------------------------- /Source/bass/c/rectest/rectest.rc: -------------------------------------------------------------------------------- 1 | #include "windows.h" 2 | 3 | 1000 DIALOG DISCARDABLE 200, 100, 140, 115 4 | STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 5 | CAPTION "BASS recording example" 6 | FONT 8, "MS Sans Serif" 7 | BEGIN 8 | COMBOBOX 16,5,5,130,72,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP 9 | COMBOBOX 13,5,20,130,72,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP 10 | CTEXT "",15,5,34,130,8,SS_CENTERIMAGE 11 | CONTROL "",14,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | 12 | WS_TABSTOP,5,43,130,11 13 | COMBOBOX 17,5,60,130,72,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP 14 | PUSHBUTTON "Record",10,5,76,40,13 15 | PUSHBUTTON "Play",11,50,76,40,13,WS_DISABLED 16 | PUSHBUTTON "Save...",12,95,76,40,13,WS_DISABLED 17 | CTEXT "",20,5,93,130,12,SS_CENTERIMAGE | SS_SUNKEN 18 | CONTROL "",21,"msctls_progress32",PBS_SMOOTH,5,105,130,5 19 | END 20 | -------------------------------------------------------------------------------- /Source/bass/c/rectest/rectest.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {4FD2AD5D-39B5-4B75-A79F-93D6DD15A06B} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;comctl32.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Windows 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;comctl32.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Windows 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Source/bass/c/speakers/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = speakers.exe 4 | FLAGS += -mwindows 5 | LIBS += -lcomdlg32 6 | 7 | all: $(TARGET) 8 | 9 | clean: 10 | $(RM) $(OUTDIR)\$(TARGET) 11 | -------------------------------------------------------------------------------- /Source/bass/c/speakers/speakers.c: -------------------------------------------------------------------------------- 1 | /* 2 | BASS multi-speaker example 3 | Copyright (c) 2003-2021 Un4seen Developments Ltd. 4 | */ 5 | 6 | #include 7 | #include 8 | #include "bass.h" 9 | 10 | HWND win; 11 | 12 | DWORD chan[4]; // channel handles 13 | 14 | // display error messages 15 | void Error(const char *es) 16 | { 17 | char mes[200]; 18 | sprintf(mes, "%s\n(error code: %d)", es, BASS_ErrorGetCode()); 19 | MessageBox(win, mes, 0, 0); 20 | } 21 | 22 | #define MESS(id,m,w,l) SendDlgItemMessage(win,id,m,(WPARAM)(w),(LPARAM)(l)) 23 | #define ITEM(id) GetDlgItem(win,id) 24 | 25 | DWORD GetSpeakerFlags(DWORD speaker) 26 | { 27 | int mono = MESS(30 + speaker * 2, BM_GETCHECK, 0, 0) | (MESS(30 + speaker * 2 + 1, BM_GETCHECK, 0, 0) << 1); // get mono switch states 28 | return BASS_SPEAKER_N(speaker + 1) | (mono == 1 ? BASS_SPEAKER_LEFT : mono == 2 ? BASS_SPEAKER_RIGHT : 0); 29 | } 30 | 31 | BOOL CALLBACK DialogProc(HWND h, UINT m, WPARAM w, LPARAM l) 32 | { 33 | static OPENFILENAME ofn; 34 | 35 | switch (m) { 36 | case WM_COMMAND: 37 | switch (LOWORD(w)) { 38 | case IDCANCEL: 39 | EndDialog(h, 0); 40 | break; 41 | 42 | case 10: // open a file to play on #1 43 | case 11: // open a file to play on #2 44 | case 12: // open a file to play on #3 45 | case 13: // open a file to play on #4 46 | { 47 | int speaker = LOWORD(w) - 10; 48 | char file[MAX_PATH] = ""; 49 | ofn.lpstrFile = file; 50 | if (GetOpenFileName(&ofn)) { 51 | BASS_ChannelFree(chan[speaker]); // free the old channel 52 | if (!(chan[speaker] = BASS_StreamCreateFile(FALSE, file, 0, 0, BASS_SPEAKER_N(speaker + 1) | BASS_SAMPLE_LOOP | BASS_SAMPLE_FLOAT)) 53 | && !(chan[speaker] = BASS_MusicLoad(FALSE, file, 0, 0, BASS_SPEAKER_N(speaker + 1) | BASS_MUSIC_RAMPS | BASS_SAMPLE_LOOP | BASS_SAMPLE_FLOAT, 1))) { 54 | MESS(10 + speaker, WM_SETTEXT, 0, "Open file..."); 55 | Error("Can't play the file"); 56 | return 1; 57 | } 58 | MESS(10 + speaker, WM_SETTEXT, 0, strrchr(file, '\\') + 1); 59 | { // reset mono speaker switches 60 | BASS_CHANNELINFO ci; 61 | BASS_ChannelGetInfo(chan[speaker], &ci); 62 | MESS(30 + speaker * 2, BM_SETCHECK, 0, 0); 63 | MESS(30 + speaker * 2 + 1, BM_SETCHECK, 0, 0); 64 | EnableWindow(ITEM(30 + speaker * 2), ci.chans == 1); 65 | EnableWindow(ITEM(30 + speaker * 2 + 1), ci.chans == 1); 66 | } 67 | BASS_ChannelPlay(chan[speaker], FALSE); 68 | } 69 | } 70 | break; 71 | 72 | case 20: // swap #1 & #2 73 | case 21: // swap #2 & #3 74 | case 22: // swap #3 & #4 75 | { 76 | int speaker = LOWORD(w) - 20; 77 | { // swap handles 78 | HSTREAM temp = chan[speaker]; 79 | chan[speaker] = chan[speaker + 1]; 80 | chan[speaker + 1] = temp; 81 | } 82 | { // swap text 83 | char temp1[MAX_PATH], temp2[MAX_PATH]; 84 | MESS(10 + speaker, WM_GETTEXT, MAX_PATH, temp1); 85 | MESS(10 + speaker + 1, WM_GETTEXT, MAX_PATH, temp2); 86 | MESS(10 + speaker, WM_SETTEXT, 0, temp2); 87 | MESS(10 + speaker + 1, WM_SETTEXT, 0, temp1); 88 | } 89 | { // swap mono switch states 90 | int temp = MESS(30 + speaker * 2, BM_GETCHECK, 0, 0); 91 | MESS(30 + speaker * 2, BM_SETCHECK, MESS(32 + speaker * 2, BM_GETCHECK, 0, 0), 0); 92 | MESS(32 + speaker * 2, BM_SETCHECK, temp, 0); 93 | temp = MESS(31 + speaker * 2, BM_GETCHECK, 0, 0); 94 | MESS(31 + speaker * 2, BM_SETCHECK, MESS(33 + speaker * 2, BM_GETCHECK, 0, 0), 0); 95 | MESS(33 + speaker * 2, BM_SETCHECK, temp, 0); 96 | temp = IsWindowEnabled(ITEM(30 + speaker * 2)); 97 | EnableWindow(ITEM(30 + speaker * 2), IsWindowEnabled(ITEM(32 + speaker * 2))); 98 | EnableWindow(ITEM(32 + speaker * 2), temp); 99 | temp = IsWindowEnabled(ITEM(31 + speaker * 2)); 100 | EnableWindow(ITEM(31 + speaker * 2), IsWindowEnabled(ITEM(33 + speaker * 2))); 101 | EnableWindow(ITEM(33 + speaker * 2), temp); 102 | } 103 | // update speaker flags 104 | BASS_ChannelFlags(chan[speaker], GetSpeakerFlags(speaker), BASS_SPEAKER_FRONT); 105 | BASS_ChannelFlags(chan[speaker + 1], GetSpeakerFlags(speaker + 1), BASS_SPEAKER_FRONT); 106 | } 107 | break; 108 | 109 | case 30: // left #1 110 | case 31: // right #1 111 | case 32: // left #2 112 | case 33: // right #2 113 | case 34: // left #3 114 | case 35: // right #3 115 | case 36: // right #4 116 | case 37: // right #4 117 | { // update speaker flags 118 | int speaker = (LOWORD(w) - 30) / 2; 119 | BASS_ChannelFlags(chan[speaker], GetSpeakerFlags(speaker), BASS_SPEAKER_FRONT); 120 | } 121 | break; 122 | } 123 | break; 124 | 125 | case WM_INITDIALOG: 126 | win = h; 127 | memset(&ofn, 0, sizeof(ofn)); 128 | ofn.lStructSize = sizeof(ofn); 129 | ofn.hwndOwner = h; 130 | ofn.nMaxFile = MAX_PATH; 131 | ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER; 132 | ofn.lpstrFilter = "Playable files\0*.mo3;*.xm;*.mod;*.s3m;*.it;*.mtm;*.umx;*.mp3;*.mp2;*.mp1;*.ogg;*.wav;*.aif\0All files\0*.*\0\0"; 133 | // initialize default device 134 | if (!BASS_Init(-1, 44100, 0, win, NULL)) { 135 | Error("Can't initialize device"); 136 | EndDialog(h, 0); 137 | break; 138 | } 139 | { // check how many speakers the device supports 140 | BASS_INFO i; 141 | BASS_GetInfo(&i); 142 | if (i.speakers < 8) { 143 | EnableWindow(GetDlgItem(h, 13), FALSE); 144 | EnableWindow(GetDlgItem(h, 22), FALSE); 145 | } 146 | if (i.speakers < 6) { 147 | EnableWindow(GetDlgItem(h, 12), FALSE); 148 | EnableWindow(GetDlgItem(h, 21), FALSE); 149 | } 150 | if (i.speakers < 4) { 151 | EnableWindow(GetDlgItem(h, 11), FALSE); 152 | EnableWindow(GetDlgItem(h, 20), FALSE); 153 | } 154 | } 155 | return 1; 156 | 157 | case WM_DESTROY: 158 | BASS_Free(); 159 | break; 160 | } 161 | 162 | return 0; 163 | } 164 | 165 | int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 166 | { 167 | // check the correct BASS was loaded 168 | if (HIWORD(BASS_GetVersion()) != BASSVERSION) { 169 | MessageBox(0, "An incorrect version of BASS.DLL was loaded", 0, MB_ICONERROR); 170 | return 0; 171 | } 172 | 173 | DialogBox(hInstance, MAKEINTRESOURCE(1000), NULL, DialogProc); 174 | 175 | return 0; 176 | } 177 | -------------------------------------------------------------------------------- /Source/bass/c/speakers/speakers.rc: -------------------------------------------------------------------------------- 1 | #include "windows.h" 2 | 3 | 1000 DIALOG DISCARDABLE 100, 100, 230, 126 4 | STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 5 | CAPTION "BASS multi-speaker example" 6 | FONT 8, "MS Sans Serif" 7 | BEGIN 8 | GROUPBOX "1 - front",-1,5,0,220,29 9 | PUSHBUTTON "Open file...",10,10,10,165,14 10 | CONTROL "L",30,"Button",BS_AUTOCHECKBOX | WS_DISABLED | 11 | WS_TABSTOP,182,12,20,10 12 | CONTROL "R",31,"Button",BS_AUTOCHECKBOX | WS_DISABLED | 13 | WS_TABSTOP,202,12,21,10 14 | GROUPBOX "2 - rear",-1,5,31,220,29 15 | PUSHBUTTON "Open file...",11,10,40,165,14 16 | CONTROL "L",32,"Button",BS_AUTOCHECKBOX | WS_DISABLED | 17 | WS_TABSTOP,182,42,20,10 18 | CONTROL "R",33,"Button",BS_AUTOCHECKBOX | WS_DISABLED | 19 | WS_TABSTOP,202,42,21,10 20 | GROUPBOX "3 - center/LFE",-1,5,62,220,29 21 | PUSHBUTTON "Open file...",12,10,72,165,14 22 | CONTROL "L",34,"Button",BS_AUTOCHECKBOX | WS_DISABLED | 23 | WS_TABSTOP,182,74,20,10 24 | CONTROL "R",35,"Button",BS_AUTOCHECKBOX | WS_DISABLED | 25 | WS_TABSTOP,202,74,21,10 26 | GROUPBOX "4 - rear center",-1,5,92,220,29 27 | PUSHBUTTON "Open file...",13,10,102,165,14 28 | CONTROL "L",36,"Button",BS_AUTOCHECKBOX | WS_DISABLED | 29 | WS_TABSTOP,182,104,20,10 30 | CONTROL "R",37,"Button",BS_AUTOCHECKBOX | WS_DISABLED | 31 | WS_TABSTOP,202,104,21,10 32 | PUSHBUTTON "swap",20,195,24,25,14 33 | PUSHBUTTON "swap",21,195,55,25,14 34 | PUSHBUTTON "swap",22,195,86,25,14 35 | END 36 | -------------------------------------------------------------------------------- /Source/bass/c/speakers/speakers.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {FD419538-B54A-4472-8DA6-3BDE8DDBA1F1} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Windows 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Windows 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Source/bass/c/spectrum/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = spectrum.exe 4 | FLAGS += -mwindows 5 | LIBS += -lcomdlg32 -lgdi32 -lwinmm 6 | 7 | all: $(TARGET) 8 | 9 | clean: 10 | $(RM) $(OUTDIR)\$(TARGET) 11 | -------------------------------------------------------------------------------- /Source/bass/c/spectrum/spectrum.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {BDCC1DDE-3BAB-436C-934A-348C76B050E2} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;winmm.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Windows 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;winmm.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Windows 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Source/bass/c/synth/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = synth.exe 4 | 5 | all: $(TARGET) 6 | 7 | clean: 8 | $(RM) $(OUTDIR)\$(TARGET) 9 | -------------------------------------------------------------------------------- /Source/bass/c/synth/synth.c: -------------------------------------------------------------------------------- 1 | /* 2 | BASS simple synth 3 | Copyright (c) 2001-2021 Un4seen Developments Ltd. 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "bass.h" 11 | 12 | BASS_INFO info; 13 | 14 | // display error messages 15 | void Error(const char *text) 16 | { 17 | printf("Error(%d): %s\n", BASS_ErrorGetCode(), text); 18 | BASS_Free(); 19 | ExitProcess(0); 20 | } 21 | 22 | #ifndef M_PI 23 | #define M_PI 3.14159265358979323846 24 | #endif 25 | 26 | #define KEYS 20 27 | const WORD keys[KEYS] = { 28 | 'Q', '2', 'W', '3', 'E', 'R', '5', 'T', '6', 'Y', '7', 'U', 29 | 'I', '9', 'O', '0', 'P', 219, 187, 221 30 | }; 31 | #define MAXVOL 0.22 32 | #define DECAY (MAXVOL/4000) 33 | float vol[KEYS], pos[KEYS]; // key volume and position/phase 34 | 35 | DWORD CALLBACK StreamProc(HSTREAM handle, float *buffer, DWORD length, void *user) 36 | { 37 | int k, c; 38 | float omega; 39 | memset(buffer, 0, length); 40 | for (k = 0; k < KEYS; k++) { 41 | if (!vol[k]) continue; 42 | omega = 2 * M_PI * pow(2.0, (k + 3) / 12.0) * 440.0 / info.freq; 43 | for (c = 0; c < length / sizeof(float); c += 2) { 44 | buffer[c] += sin(pos[k]) * vol[k]; 45 | buffer[c + 1] = buffer[c]; // left and right channels are the same 46 | pos[k] += omega; 47 | if (vol[k] < MAXVOL) { 48 | vol[k] -= DECAY; 49 | if (vol[k] <= 0) { // faded-out 50 | vol[k] = 0; 51 | break; 52 | } 53 | } 54 | } 55 | pos[k] = fmod(pos[k], 2 * M_PI); 56 | } 57 | return length; 58 | } 59 | 60 | int main(int argc, char **argv) 61 | { 62 | HSTREAM stream; // the stream 63 | const char *fxname[9] = { "CHORUS", "COMPRESSOR", "DISTORTION", "ECHO", 64 | "FLANGER", "GARGLE", "I3DL2REVERB", "PARAMEQ", "REVERB" }; 65 | HFX fx[9] = { 0 }; // effect handles 66 | INPUT_RECORD keyin; 67 | DWORD r; 68 | 69 | printf("BASS simple synth\n" 70 | "-----------------\n"); 71 | 72 | // check the correct BASS was loaded 73 | if (HIWORD(BASS_GetVersion()) != BASSVERSION) { 74 | printf("An incorrect version of BASS.DLL was loaded"); 75 | return 0; 76 | } 77 | 78 | // initialize default output device 79 | if (!BASS_Init(-1, 44100, 0, 0, NULL)) 80 | Error("Can't initialize device"); 81 | 82 | BASS_GetInfo(&info); 83 | stream = BASS_StreamCreate(info.freq, 2, BASS_SAMPLE_FLOAT, (STREAMPROC*)StreamProc, 0); // create a stream (stereo for effects) 84 | BASS_ChannelSetAttribute(stream, BASS_ATTRIB_BUFFER, 0); // disable buffering for minimum latency 85 | BASS_ChannelPlay(stream, FALSE); // start it 86 | 87 | printf("ds version: %d (effects %s)\n", info.dsver, info.dsver < 8 ? "disabled" : "enabled"); 88 | printf("press these keys to play:\n\n" 89 | " 2 3 5 6 7 9 0 =\n" 90 | " Q W ER T Y UI O P[ ]\n\n" 91 | "press spacebar to quit\n\n"); 92 | if (info.dsver >= 8) // DX8 effects available 93 | printf("press F1-F9 to toggle effects\n\n"); 94 | 95 | while (ReadConsoleInput(GetStdHandle(STD_INPUT_HANDLE), &keyin, 1, &r)) { 96 | int key; 97 | if (keyin.EventType != KEY_EVENT) continue; 98 | if (keyin.Event.KeyEvent.wVirtualKeyCode == VK_SPACE) break; 99 | if (keyin.Event.KeyEvent.bKeyDown) { 100 | if (keyin.Event.KeyEvent.wVirtualKeyCode >= VK_F1 101 | && keyin.Event.KeyEvent.wVirtualKeyCode <= VK_F9) { 102 | int n = keyin.Event.KeyEvent.wVirtualKeyCode - VK_F1; 103 | if (fx[n]) { 104 | BASS_ChannelRemoveFX(stream, fx[n]); 105 | fx[n] = 0; 106 | printf("effect %s = OFF\t\t\r", fxname[n]); 107 | } else { 108 | // set the effect, not bothering with parameters (use defaults) 109 | if (fx[n] = BASS_ChannelSetFX(stream, BASS_FX_DX8_CHORUS + n, 0)) 110 | printf("effect %s = ON\t\t\r", fxname[n]); 111 | } 112 | } 113 | } 114 | for (key = 0; key < KEYS; key++) 115 | if (keyin.Event.KeyEvent.wVirtualKeyCode == keys[key]) { 116 | if (keyin.Event.KeyEvent.bKeyDown && vol[key] < MAXVOL) { 117 | pos[key] = 0; 118 | vol[key] = MAXVOL + DECAY / 2; // start key (setting "vol" slightly higher than MAXVOL to cover any rounding-down) 119 | } else if (!keyin.Event.KeyEvent.bKeyDown && vol[key]) 120 | vol[key] -= DECAY; // trigger key fadeout 121 | break; 122 | } 123 | } 124 | 125 | BASS_Free(); 126 | return 0; 127 | } 128 | -------------------------------------------------------------------------------- /Source/bass/c/synth/synth.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {F710CC47-BAAF-44DD-9F1B-D7F5AEEEDB56} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Console 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Console 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Source/bass/c/writewav/makefile: -------------------------------------------------------------------------------- 1 | include ..\makefile.in 2 | 3 | TARGET = writewav.exe 4 | 5 | all: $(TARGET) 6 | 7 | clean: 8 | $(RM) $(OUTDIR)\$(TARGET) 9 | -------------------------------------------------------------------------------- /Source/bass/c/writewav/writewav.c: -------------------------------------------------------------------------------- 1 | /* 2 | BASS console WAV writer 3 | Copyright (c) 2002-2021 Un4seen Developments Ltd. 4 | */ 5 | 6 | #include 7 | #include 8 | #include "bass.h" 9 | 10 | #ifdef _WIN32 // Windows 11 | #include 12 | #else // OSX 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | int _kbhit() 20 | { 21 | int r; 22 | fd_set rfds; 23 | struct timeval tv; 24 | struct termios term, oterm; 25 | tcgetattr(0, &oterm); 26 | memcpy(&term, &oterm, sizeof(term)); 27 | cfmakeraw(&term); 28 | tcsetattr(0, TCSANOW, &term); 29 | FD_ZERO(&rfds); 30 | FD_SET(0, &rfds); 31 | tv.tv_sec = tv.tv_usec = 0; 32 | r = select(1, &rfds, NULL, NULL, &tv); 33 | tcsetattr(0, TCSANOW, &oterm); 34 | return r; 35 | } 36 | #endif 37 | 38 | #if __BIG_ENDIAN__ 39 | inline DWORD le_32(DWORD v) 40 | { 41 | return (v >> 24) | ((v >> 8) & 0xff00) | ((v & 0xff00) << 8) | (v << 24); 42 | } 43 | inline WORD le_16(WORD v) 44 | { 45 | return (v >> 8) | (v << 8); 46 | } 47 | #else 48 | #define le_32(v) (v) 49 | #define le_16(v) (v) 50 | #endif 51 | 52 | // display error messages 53 | void Error(const char *text) 54 | { 55 | printf("Error(%d): %s\n", BASS_ErrorGetCode(), text); 56 | BASS_Free(); 57 | exit(0); 58 | } 59 | 60 | int main(int argc, char **argv) 61 | { 62 | BASS_CHANNELINFO info; 63 | DWORD chan, p; 64 | QWORD len, pos; 65 | FILE *fp; 66 | WAVEFORMATEX wf; 67 | 68 | printf("BASS WAV writer example\n" 69 | "-----------------------\n"); 70 | 71 | // check the correct BASS was loaded 72 | if (HIWORD(BASS_GetVersion()) != BASSVERSION) { 73 | printf("An incorrect version of BASS was loaded"); 74 | return 0; 75 | } 76 | 77 | if (argc != 2) { 78 | printf("\tusage: writewav \n"); 79 | return 0; 80 | } 81 | 82 | // initalize "no sound" device 83 | if (!BASS_Init(0, 44100, 0, 0, NULL)) 84 | Error("Can't initialize device"); 85 | 86 | // load plugins for additional input format support 87 | #ifdef _WIN32 88 | { 89 | WIN32_FIND_DATA fd; 90 | HANDLE fh; 91 | fh = FindFirstFile("bass*.dll", &fd); 92 | if (fh != INVALID_HANDLE_VALUE) { 93 | int c = 0; 94 | do { 95 | if (BASS_PluginLoad(fd.cFileName, 0)) { 96 | if (!c++) printf("plugins:"); 97 | printf(" %s", fd.cFileName); 98 | } 99 | } while (FindNextFile(fh, &fd)); 100 | if (c) printf("\n"); 101 | FindClose(fh); 102 | } 103 | } 104 | #else 105 | { 106 | glob_t g; 107 | #ifdef __APPLE__ 108 | if (!glob("libbass*.dylib", 0, 0, &g)) { 109 | #else 110 | if (!glob("libbass*.so", 0, 0, &g)) { 111 | #endif 112 | int a, c = 0; 113 | for (a = 0; a < g.gl_pathc; a++) { 114 | if (BASS_PluginLoad(g.gl_pathv[a], 0)) { 115 | if (!c++) printf("plugins:"); 116 | printf(" %s", g.gl_pathv[a]); 117 | } 118 | } 119 | if (c) printf("\n"); 120 | } 121 | globfree(&g); 122 | } 123 | #endif 124 | 125 | if (strstr(argv[1], "://")) { 126 | // try streaming the URL 127 | chan = BASS_StreamCreateURL(argv[1], 0, BASS_STREAM_DECODE | BASS_STREAM_BLOCK, 0, 0); 128 | } else { 129 | // try streaming the file 130 | chan = BASS_StreamCreateFile(FALSE, argv[1], 0, 0, BASS_STREAM_DECODE); 131 | if (!chan && BASS_ErrorGetCode() == BASS_ERROR_FILEFORM) { 132 | // try MOD music formats 133 | chan = BASS_MusicLoad(FALSE, argv[1], 0, 0, BASS_MUSIC_DECODE | BASS_MUSIC_RAMPS | BASS_MUSIC_PRESCAN, 0); 134 | } 135 | } 136 | if (!chan) Error("Can't handle the file"); 137 | 138 | len = BASS_ChannelGetLength(chan, BASS_POS_BYTE); 139 | 140 | printf("output: bass.wav\n"); 141 | if (!(fp = fopen("bass.wav", "wb"))) Error("Can't create output file"); 142 | // write WAV header 143 | BASS_ChannelGetInfo(chan, &info); 144 | wf.wFormatTag = 1; 145 | wf.nChannels = info.chans; 146 | wf.wBitsPerSample = (info.flags & BASS_SAMPLE_8BITS ? 8 : 16); 147 | wf.nBlockAlign = wf.nChannels * wf.wBitsPerSample / 8; 148 | wf.nSamplesPerSec = info.freq; 149 | wf.nAvgBytesPerSec = wf.nSamplesPerSec * wf.nBlockAlign; 150 | #if __BIG_ENDIAN__ // swap byte order 151 | wf.wFormatTag = le_16(wf.wFormatTag); 152 | wf.nChannels = le_16(wf.nChannels); 153 | wf.wBitsPerSample = le_16(wf.wBitsPerSample); 154 | wf.nBlockAlign = le_16(wf.nBlockAlign); 155 | wf.nSamplesPerSec = le_32(wf.nSamplesPerSec); 156 | wf.nAvgBytesPerSec = le_32(wf.nAvgBytesPerSec); 157 | #endif 158 | fwrite("RIFF\0\0\0\0WAVEfmt \20\0\0\0", 20, 1, fp); 159 | fwrite(&wf, 16, 1, fp); 160 | fwrite("data\0\0\0\0", 8, 1, fp); 161 | 162 | while (!_kbhit()) { 163 | short buf[10000]; 164 | int c = BASS_ChannelGetData(chan, buf, sizeof(buf)); 165 | if (c == -1) break; 166 | #if __BIG_ENDIAN__ 167 | if (!(info.flags & BASS_SAMPLE_8BITS)) // swap 16-bit byte order 168 | for (p = 0; p < c / 2; p++) buf[p] = le_16(buf[p]); 169 | #endif 170 | fwrite(buf, 1, c, fp); 171 | pos = BASS_ChannelGetPosition(chan, BASS_POS_BYTE); 172 | printf(" (press any key to stop)\rdone: %lld / %lld", pos, len); 173 | fflush(stdout); 174 | } 175 | printf(" \n"); 176 | 177 | // complete WAV header 178 | fflush(fp); 179 | p = ftell(fp); 180 | fseek(fp, 4, SEEK_SET); 181 | putw(le_32(p - 8), fp); 182 | fflush(fp); 183 | fseek(fp, 40, SEEK_SET); 184 | putw(le_32(p - 44), fp); 185 | fflush(fp); 186 | fclose(fp); 187 | 188 | BASS_Free(); 189 | return 0; 190 | } 191 | -------------------------------------------------------------------------------- /Source/bass/c/writewav/writewav.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | Win32 7 | 8 | 9 | Release 10 | x64 11 | 12 | 13 | 14 | {6102AFDE-AFAD-4750-AC38-75DDC9268531} 15 | 16 | 17 | 18 | Application 19 | NotSet 20 | 21 | 22 | Application 23 | NotSet 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ..\bin\ 37 | 38 | 39 | ..\bin\x64\ 40 | 41 | 42 | 43 | ..;%(AdditionalIncludeDirectories) 44 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 45 | MultiThreadedDLL 46 | 47 | 48 | bass.lib;%(AdditionalDependencies) 49 | ..;%(AdditionalLibraryDirectories) 50 | Console 51 | 52 | 53 | 54 | 55 | ..;%(AdditionalIncludeDirectories) 56 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 57 | MultiThreadedDLL 58 | 59 | 60 | bass.lib;%(AdditionalDependencies) 61 | ..\x64;%(AdditionalLibraryDirectories) 62 | Console 63 | MachineX64 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Source/bass/c/x64/bass.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/c/x64/bass.lib -------------------------------------------------------------------------------- /Source/bass/x64/bass.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/bass/x64/bass.dll -------------------------------------------------------------------------------- /Source/example.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/example.cpp -------------------------------------------------------------------------------- /Source/framework.h: -------------------------------------------------------------------------------- 1 | // header.h: включаемый файл для стандартных системных включаемых файлов 2 | // или включаемые файлы для конкретного проекта 3 | // 4 | 5 | #pragma once 6 | 7 | #include "targetver.h" 8 | #define WIN32_LEAN_AND_MEAN // Исключите редко используемые компоненты из заголовков Windows 9 | // Файлы заголовков Windows 10 | #include 11 | // Файлы заголовков среды выполнения C 12 | #include 13 | #include 14 | #include 15 | #include 16 | -------------------------------------------------------------------------------- /Source/names2.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #define MixOS 1000 3 | #define TerminalProg 1001 4 | #define QuestProg 1002 5 | #define YoutubeProg 1003 6 | #define MenumakerProg 1004 7 | #define PianoProg 1005 8 | #define PLDProg 1006 9 | #define OSProg 1007 10 | #define UAProg 1008 11 | #define EmulateProg 1009 12 | #define PROG 1010 13 | #define UAKILL 1536 14 | #define UADOMDOM 1538 -------------------------------------------------------------------------------- /Source/player.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30621.155 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConsoleApplication16", "ConsoleApplication16.vcxproj", "{3C1C739C-6B65-4CAD-8140-41DBB27958CB}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Debug|x64.ActiveCfg = Debug|x64 17 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Debug|x64.Build.0 = Debug|x64 18 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Debug|x86.ActiveCfg = Debug|Win32 19 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Debug|x86.Build.0 = Debug|Win32 20 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|x64.ActiveCfg = Release|x64 21 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|x64.Build.0 = Release|x64 22 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|x86.ActiveCfg = Release|Win32 23 | {3C1C739C-6B65-4CAD-8140-41DBB27958CB}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {855BEB3E-E8BE-46DE-A243-D81F7CCD086F} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Source/player.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Source/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/resource.h -------------------------------------------------------------------------------- /Source/resource1.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/resource1.h -------------------------------------------------------------------------------- /Source/resource2.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/resource2.h -------------------------------------------------------------------------------- /Source/resource3.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/resource3.h -------------------------------------------------------------------------------- /Source/resource4.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/resource4.h -------------------------------------------------------------------------------- /Source/resource5.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/resource5.h -------------------------------------------------------------------------------- /Source/resource6.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/resource6.h -------------------------------------------------------------------------------- /Source/stderr.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/stderr.txt -------------------------------------------------------------------------------- /Source/stdout.txt: -------------------------------------------------------------------------------- 1 | DOSBox version 0.73 2 | Copyright 2002-2009 DOSBox Team, published under GNU GPL. 3 | --- 4 | CONFIG:Loading primary settings from config file MusicPlayer\W311\WIN2.conf 5 | "serialmouse" is not a valid value for variable: type. 6 | It might now be reset it to default value: dummy 7 | MIDI:Opened device:win32 8 | -------------------------------------------------------------------------------- /Source/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // // При включении SDKDDKVer.h будет задана самая новая из доступных платформ Windows. 4 | // Если вы планируете сборку приложения для предыдущей версии платформы Windows, включите WinSDKVer.h и 5 | // задайте желаемую платформу в макросе _WIN32_WINNT, прежде чем включать SDKDDKVer.h. 6 | #include 7 | -------------------------------------------------------------------------------- /Source/вапвап1.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CaptainStrannik/MixOS/974e0592e4e1aa7600d16341167894352db2b8bf/Source/вапвап1.cpp --------------------------------------------------------------------------------