diff --git a/src/xpdev/xpbeep.c b/src/xpdev/xpbeep.c
index b3aaa40f02cd7f8c59a285d268ad4bfe50db5f3b..85c292ea4ed80541f60f238c1b4d137ef082cfb7 100644
--- a/src/xpdev/xpbeep.c
+++ b/src/xpdev/xpbeep.c
@@ -832,7 +832,7 @@ xptone_close(void)
 
 // This can't be const because the Win32 API is not const.
 static bool
-do_xp_play_sample(const unsigned char *sampo, size_t sz, int *freed)
+do_xp_play_sample(unsigned char *sampo, size_t sz, int *freed)
 {
 	unsigned char *samp;
 	int need_copy = 0;