Add sound file for warnings?

3 posts in this topic

So I was looking to add a sound file for warnings. I googled a bit had little luck finding anything. There does not seem to be an option and theres no obvious place in the dbm folders to add a sound file so it appears in the list of sounds.


So how would I go about getting this done?



edit: Found info on SharedMedia but I am struggling to get this to work I have done the following:


Downloaded Sharedmedia and Libstub addons via Curse Client


Added a MyMedia folde rint he addons folder


Copied the libs folder from SharedMedia to the My Media folder


Created the following text files

## Interface: 40100
## Title: SharedMedia - MyMedia
## Notes: Inserts some media into LibSharedMedia's storage.
## Version: 3.0.4-179
## Author: Elkano
## OptionalDeps: LibStub, LibSharedMedia-3.0



saved this as MyMedia.toc in the MyMedia folder as "All files"


As well as this text file

local LSM = LibStub("LibSharedMedia-3.0")


I also added a folder callefd sound tot he my Media folder and added the dodge.mp3 file to it



I feel I am close and assume I have screwed something up in the code above.

Edited by Thanøs

Share this post

Link to post
Share on other sites

text file? you need a lua file, which is also defined in your mymedia.toc file, it needs to be a working addon. You also need to make sure toc has set optional dependency on libsharedmedia to ensure it loads first. There is no short way to explain all of it though.

Share this post

Link to post
Share on other sites

Yes of course forgot to type out that the second text file was saved as a lua file using the  "all files" setting as MyMeda.lua


I figured out my problem though it seems


this line:


should have been

LSM:Register("sound", "Name", [[Interface\AddOns\MyMedia\sound\dodge.mp3]])

I did not realize that "sound" was an identifier telling what the file is and the "name" part is the title of the file as it would appear in the drop down list in game. I named it "Dodge!" in my case.



Any chance you can add the ability for custom sound files into DBM so it is a bit easier to do? Granted at this point it is sort of easy for me to do, more sound files juat need to be dropped into the sound folder and a new LSM:Register line added to the lua file that points ot the sound. But I imagine some DBM users might not want to go through all this to get the desired effect.

Edited by Thanøs

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.