H2012's Profile
Reputation: 0
Apprentice
- Group:
- New Members
- Active Posts:
- 8 (0.03 per day)
- Joined:
- 19-September 12
- Profile Views:
- 615
- Last Active:
Mar 07 2013 11:36 PM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: Visual C#: Failing At Creating A Music Player
Posted 19 Sep 2012
Alright, I've been able to make, minus a few details, a playlist.
One thing eludes me, though: I can't quite figure out how to get it to play files off of imported music. I can only get it to play music through a long file location, I.E. C:\Users\Desktop\Music\Artist\CD\Song 1.MP3.
I've created a "resources" folder and used it to add an image successfully, but I can't seem to do the same with music files.
If it helps any, I'm using "axWindowsMediaPlayer1.URL" to tell it which song to play. -
In Topic: Visual C#: Failing At Creating A Music Player
Posted 19 Sep 2012
Mm, is there a template in Visual C# for making a desktop application? If so, I'm not seeing it. -
In Topic: Visual C#: Failing At Creating A Music Player
Posted 19 Sep 2012
Well, I don't know what else to use to make it.
I'm very much a beginner and all I've been taught so far is console programs and XNA. -
In Topic: Visual C#: Failing At Creating A Music Player
Posted 19 Sep 2012
It's failing when I try to add any feature other than "play."
using System; using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Media; namespace DIM { public class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; SpriteBatch spriteBatch; SoundEffect S1; SoundEffect S2; SoundEffectInstance SEI_1; SoundEffectInstance SEI_2; KeyboardState currentKeyState; public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; } protected override void LoadContent() { S1 = Content.Load<SoundEffect>("Descent Into Madness"); S2 = Content.Load<SoundEffect>("Sunlight"); SEI_1 = S1.CreateInstance(); SEI_2 = S2.CreateInstance(); spriteBatch = new SpriteBatch(GraphicsDevice); } protected override void Update(GameTime gameTime) { if (SEI_1.State == SoundState.Stopped) { SEI_1.Play(); } if (SEI_1.State == SoundState.Playing && currentKeyState.IsKeyDown(Keys.D1)) { SEI_1.Pause(); } base.Update(gameTime); }
This is the whole code, minus draw code and basically code I haven't done anything with.
The part in particular that I'm working with is this.
if (SEI_1.State == SoundState.Stopped) { SEI_1.Play(); } if (SEI_1.State == SoundState.Playing && currentKeyState.IsKeyDown(Keys.D1)) { SEI_1.Pause(); }
It will play just fine, however if I try to pause it, or for that matter, anything other than play, it doesn't do as it's supposed to do. -
In Topic: Visual C#: Failing At Creating A Music Player
Posted 19 Sep 2012
Hello Modi123_1,
Apologies for that, I'll see if I can restate things a bit.
Basically, I'm looking for methods and other ways in which I could create a portable music player, meaning it has a playlist that's running off of its own files, and has the basics, such as play, pause, stop, and volume control. An auto-play function would be nice, but isn't critical in the initial build.
If that still isn't clear enough, definitely be sure to let me know and again, my apologies.
-H2012
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Private
Friends
H2012 hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
H2012 has no profile comments yet. Why not say hello?