Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
duckfromdiscord committed Oct 20, 2023
1 parent 0c9c887 commit ee17c2a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# Wavebreaker-Hook
DLL file that enables an Audiosurf game client to connect to [Wavebreaker](https://github.com/AudiosurfResearch/Wavebreaker) (or any other Audiosurf 1 server implementation).
This eliminates the need for any changes to the HOSTS file, which brings numerous advantages, like being easier to set up or allowing users to still be able to access the official site, if needed.
# as-scrobbler
Allows you to scrobble music listened to in Audiosurf 1 to a [maloja](https://github.com/krateng/maloja) server with the power of [SafetyHook](https://github.com/cursey/safetyhook), C++ and Rust. as-scrobbler rewrites parts of the Wininet library to emulate the last.fm server Audiosurf 1 uses for its built-in scrobbling capabilities, and allows you to send these scrobbles elsewhere.

# Install
1. Find the game directory using Steam (Right-click Audiosurf in Library > Manage > Browse game files)
2. Enter ``engine`` folder
3. Enter ``channels`` folder
4. Paste DLL file
5. Launch game through steam
# How do I get it to work?
You will need to copy the DLL to `...\SteamLibrary\steamapps\common\Audiosurf\engine\channels`, and also make sure to place my [audiosurfscrobblerlib](https://github.com/duckfromdiscord/audiosurfscrobblerlib) alongside it. Note that as-scrobbler **only** emulates a server, and the actual scrobbling logic comes from audiosurfscrobblerlib. Your game will not work if you only have as-scrobbler. You also need to place `preload_enabler.toml` one folder above, in `...\SteamLibrary\steamapps\common\Audiosurf\engine`. This file is where you specify your maloja URL, port, and API key. **Also, make sure to enable last.fm scrobbling in-game so that the requests will trigger and thereby be intercepted.**

# How?
Through a special type of magic known as *function hooking.* To facilitate this, we use cursey's [SafetyHook](https://github.com/cursey/safetyhook).
# Why is it called preload_enabler?
The original goal of this project was to force Audiosurf to fully load your song into memory before playing it, but this functionality is not yet implemented and enabling it will crash your game.

# Can you allow scrobbling to something else?
All of the scrobbling logic is in [audiosurfscrobblerlib](https://github.com/duckfromdiscord/audiosurfscrobblerlib). I did this on purpose because it's much easier to add functionality to that than rebuilding as-scrobbler all the time. If you open a PR, it will make it easier for me to add a scrobbling server. I may also add some on my own later on.
8 changes: 0 additions & 8 deletions include/preload.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
/**
* This file:
* - hooks wininet functions
* - rewrites game requests to go to a custom server
* - rewrites HTTP requests to use HTTPS
*/

#include <Windows.h>
#include <WinInet.h>
#include <stdexcept>
#include <safetyhook.hpp>
#include <spdlog/spdlog.h>
Expand Down
1 change: 0 additions & 1 deletion include/scrobbler.hpp
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// I have no idea how this works
typedef void(__stdcall* scrobble)(const char* postdata, const char* url, const char* key);

0 comments on commit ee17c2a

Please sign in to comment.