Search Results

Search found 5945 results on 238 pages for 'mp3 player'.

Page 11/238 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • media player or dj software

    - by Dale
    Been searching for quite some time for a player that will cross fade correctly. What I mean by that, most players have the ability to start fading with a given time left of the song (ex:10 secs) While at times that can be fine, but is there software or a plugin for software that can tell the difference between a song that fades out, or a song that has a cold ending? So far the best one out there that I have tested is PCDJ, but I am sure there has to be something that can distinguish between endings of songs. Should add...this is for windows. Running vista Thanks in advance

    Read the article

  • How to fix choppy video with VLC player?

    - by Brian Ojeda
    When playing most movies in VLC player, the video feed is choppy. Furthermore, the sound is near perfect. Another catch is, this video issue wasn't always an issue. I use to play movies with no problem with video or sound. I can not pin point what has changed between the it use to work fine and the time it started being choppy though. I have an ASUS G73JW-A1. This system should be more than enough to handle the demand of playing HD videos. Movies that are normally effected are HD videos. These video range from 4 to 9 gigs. In addition, the videos are in MKV, MP4 (or M4V), and AVCHD (or M2TS) formats. I get the same results when playing move directly off my hard drive or off an external. Finally, all the drivers have been recently checked and updated if needed.

    Read the article

  • Microsoft Keyboard(8000) play button opens Windows Media Player rather than Zune on Windows 7

    - by Chance
    Im currently using the Microsoft 8000 keyboard on Windows 7 and before installing Microsoft's Keyboard application, it was opening Zune and playing music with the play button. After installation, it is now opening Windows Media Player rather than Zune. If I have Zune open and press play, it will open WMP and upon pressing it again, will kick off the play command in Zune. I've checked the default programs in the control panel and have set Zune as default for all available but that hasn't changed anything. Has anyone run into this before? I'm a bit stumped as googling does not produce any relevant results. Thanks!

    Read the article

  • Sync Music to External Hard Drive with Windows Media Player

    - by dtbarne
    I'd like to sync my music from my internal hard drive to an external hard drive. Windows Media Player doesn't recognize my USB external hard drive as a syncable device. If I plug in any USB flash drive, it shows up as a device, but I can't seem to get it to recognize my external hard drive. Per some googling suggestions, the only suggestion I came across was to try enabling the "Portable Device Enumerator" service, but that yielded no luck. Is there any way to sync my music from WMP to an external hard drive?

    Read the article

  • Windows Media Player 11 Not Detecting Autoplaylists

    - by tuna
    Every time I open Windows Media Player it fails to detect my autoplaylists stored in <my music library dir>\Playlists. This appears to lead to sync problems since I (exclusively) use autoplaylists to sync music to my mobile. As WMP 11 fails to find the any sync autoplaylists it infuriatingly seems to decide that I want no music at all on my phone and proceeds to delete all my music off my phone. I guess these are two seperate problems but it seems to me they are related. If anyone can shed any light on a fix, that would be much appreciated. Many thanks

    Read the article

  • Windows Media Player won't open

    - by Haein
    When I tried to play a DVD on my laptop, I tried to open WMP but it didn't open. I did leave the DVD in my laptop for a fortnight but when I played it a week ago it was fine and my DVD drive is reading the DVD so I think that's ok. I tried to make sure WMP is up to date and it was working fine until a few days ago. I can't think of any triggers for this and when I tried to uninstall it that didn't work either as I couldn't even find it in the programs list. I then tried to install a different media player (GOM) but that didn't play my DVD either although it did play music fine. I am really concerned - should I just get a new laptop? Or is it worth getting it fixed?

    Read the article

  • Music player for ubuntu similar to iTunes

    - by Allwar
    Hi, I really like Itunes as a music player but i can't get it to work in ubuntu so I need another one! functions i want: shuffle, low cpu usage, a friendly interface and free of bugs. (friendly interface = esay to use) why not use rythmbox, well it has bugs, the shuffle button doesn't work because it shuffles the next song after each song. So when i use it it's just a big loop over three different songs! i want the itunes look, like it shuffles once and lets you see in what order the songs will be played. //Alvar

    Read the article

  • VM connected to network but not to internet in VMware Player 6 on Windows 8.1 host

    - by user1257262
    So I am running Bitnami's MEAN stack in VMware Player 6.0.2 on Windows 8.1 and the VM connects just fine to the network: https://www.dropbox.com/s/xfdzohjuuepz52w/ifconfig.PNG However, I am having a great deal of trouble getting the VM to communicate with the internet. No matter what sort of action I take (even something as simple as apt-get update), the machine just sits there and eventually fails to connect. Here is my VM's Network Adapter configuration: https://www.dropbox.com/s/xfdzohjuuepz52w/ifconfig.PNG On my host Windows 8.1 computer, I actually have the VMware Bridge Protocol enabled but for VMware Network Adapters (VMnet1 and VMnet 8), but they are listed as having No Internet access in my Network and Sharing Center. I am not entirely sure if these adapters are relevant to connecting the VM to the internet, to be honest. This is the first time I have ever had an issue connecting a virtual machine to the internet. This problem is also happening with other VM's I am trying to run. Can someone tell me what I am doing wrong and how I can fix it?

    Read the article

  • VMware player unity with ubuntu 11.10 guest on W7 host - empty applications start menu

    - by lexalizer
    I am trying to run Ubuntu 11.10 as a guest on Windows 7. When I enter into unity mode, the menu for the guest os, next to the Windows start menu is empty. I have searched around the web for a fix for this, but there doesn't seem to be anything that works. I have tried restarting the guest os several times, I am running VMware player as an admin, but the guest start menu in unity mode is still empty. I have tried clearing the VM cache. I have installed all the Ubuntu updates and the VMware tools. Has anyone had this problem?

    Read the article

  • Connect to server in VMWare player while host is not connected to a network

    - by blockcipher
    Hello, I have a linux server VM on my host machine using VMWare player and if I'm on a network, I can connect to the web server on the VM via a web browser. However, I tried to do the same while I was disconnected from a network and I couldn't. The networking is set to Host-only and I did use dhclient/ifconfig to make sure that yes, I did have an IP address assigned to the VM. While I can work around this, the purpose of the VM is to allow us to demo our app from any machine and that machine may not be connected to a network. Thanks.

    Read the article

  • Small hiccup with VMware Player after upgrading to Ubuntu 12.04

    The upgrade process Finally, it was time to upgrade to a new LTS version of Ubuntu - 12.04 aka Precise Pangolin. I scheduled the weekend for this task and despite the nickname of Mauritius (Cyber Island) it took roughly 6 hours to download nearly 2.400 packages. No problem in general, as I have spare machines to work on, and it was weekend anyway. All went very smooth and only a few packages required manual attention due to local modifications in the configuration. With the new kernel 3.2.0-24 it was necessary to reboot the system and compared to the last upgrade, I got my graphical login as expected. Compilation of VMware Player 4.x fails A quick test on the installed applications, Firefox, Thunderbird, Chromium, Skype, CrossOver, etc. reveils that everything is fine in general. Firing up VMware Player displays the known kernel mod dialog that requires to compile the modules for the newly booted kernel. Usually, this isn't a big issue but this time I was confronted with the situation that vmnet didn't compile as expected ("Failed to compile module vmnet"). Luckily, this issue is already well-known, even though with "Failed to compile module vmmon" as general reason but nevertheless it was very easy and quick to find the solution to this problem. In VMware Communities there are several forum threads related to this topic and VMware provides the necessary patch file for Workstation 8.0.2 and Player 4.0.2. In case that you are still on Workstation 7.x or Player 3.x there is another patch file available. After download extract the file like so: tar -xzvf vmware802fixlinux320.tar.gz and run the patch script as super-user: sudo ./patch-modules_3.2.0.sh This will alter the existing installation and source files of VMware Player on your machine. As last step, which isn't described in many other resources, you have to restart the vmware service, or for the heart-fainted, just reboot your system: sudo service vmware restart This will load the newly created kernel modules into your userspace, and after that VMware Player will start as usual. Summary Upgrading any derivate of Ubuntu, in my case Xubuntu, is quick and easy done but it might hold some surprises from time to time. Nonetheless, it is absolutely worthy to go for it. Currently, this patch for VMware is the only obstacle I had to face so far and my system feels and looks better than before. Happy upgrade! Resources I used the following links based on Google search results: http://communities.vmware.com/message/1902218#1902218http://weltall.heliohost.org/wordpress/2012/01/26/vmware-workstation-8-0-2-player-4-0-2-fix-for-linux-kernel-3-2-and-3-3/ Update on VMware Player 4.0.3 Please continue to read on my follow-up article in case that you upgraded either VMware Workstation 8.0.3 or VMware Player 4.0.3.

    Read the article

  • Rotate camera around player and set new forward directions

    - by Samurai Fox
    I have a 3rd person camera which can rotate around the player. When I look at the back of the player and press forward, player goes forward. Then I rotate 360 around the player and "forward direction" is tilted for 90 degrees. So every 360 turn there is 90 degrees of direction change. For example when camera is facing the right side of the player, when I press button to move forward, I want player to turn to the left and make that the "new forward". I have Player object with Camera as child object. Camera object has Camera script. Inside Camera script there are Player and Camera classes. Player object itself, has Input Controller. Also I'm making this script for joystick/ controller primarily. My camera script so far: using UnityEngine; using System.Collections; public class CameraScript : MonoBehaviour { public GameObject Target; public float RotateSpeed = 10, FollowDistance = 20, FollowHeight = 10; float RotateSpeedPerTime, DesiredRotationAngle, DesiredHeight, CurrentRotationAngle, CurrentHeight, Yaw, Pitch; Quaternion CurrentRotation; void LateUpdate() { RotateSpeedPerTime = RotateSpeed * Time.deltaTime; DesiredRotationAngle = Target.transform.eulerAngles.y; DesiredHeight = Target.transform.position.y + FollowHeight; CurrentRotationAngle = transform.eulerAngles.y; CurrentHeight = transform.position.y; CurrentRotationAngle = Mathf.LerpAngle(CurrentRotationAngle, DesiredRotationAngle, 0); CurrentHeight = Mathf.Lerp(CurrentHeight, DesiredHeight, 0); CurrentRotation = Quaternion.Euler(0, CurrentRotationAngle, 0); transform.position = Target.transform.position; transform.position -= CurrentRotation * Vector3.forward * FollowDistance; transform.position = new Vector3(transform.position.x, CurrentHeight, transform.position.z); Yaw = Input.GetAxis("Right Horizontal") * RotateSpeedPerTime; Pitch = Input.GetAxis("Right Vertical") * RotateSpeedPerTime; transform.Translate(new Vector3(Yaw, -Pitch, 0)); transform.position = new Vector3(transform.position.x, transform.position.y, transform.position.z); transform.LookAt(Target.transform); } }

    Read the article

  • Intersection of player and mesh

    - by Will
    I have a 3D scene, and a player that can move about in it. In a time-step the player can move from point A to point B. The player should follow the terrain height but slow going up cliffs and then fall back, or stop when jumping and hitting a wall and so on. In my first prototype I determine the Y at the player's centre's X,Z by intersecting a ray with every triangle in the scene. I am not checking their path, but rather just sampling their end-point for each tick. Despite this being Javascript, it works acceptably performance-wise. However, because I am modeling the player as a single point, the player can position themselves so that they are half-in a cliff face and so on. I need to model them as as a solid e.g. some cluster of spheres or a even their fuller mesh. I am also concerned that if they were moving faster they might miss the test altogether. How should I solve this?

    Read the article

  • Vmware Player 3.0 - cannot ping 32 bits guest from 64 bits (guest or host)

    - by npmj
    I'm stuck with what seems a bug in VmWare Player (build 203739). I'm using W7 Ultimate 64bits as host and have a CentOS 5.4 (64 bits) as a guest and a Windows XP Professional SP3 (32 bits) as another guest. From the 64 bits machines (the host and the linux guest) I cannot ping the windows XP. Off course, I already turned off the windows firewall in the guest and also in the host. The network is pretty basic, I'm using Vmnet8 (NAT), with DHCP and port forwarding (to the windows XP's IP). Everything is working ok, I have internet access from host and from both guests. Port forwarding to the XP guest is working ok too. The only problem is that I cannot access the XP guest through the Vmnet8. I monitored the traffic using wireshark (in the host and in the windows guest). If I try to ping the XP guest from the host, what I see is the ARP request leaving the host, being answered by the guest and, after that, there is no echo request leaving the host. The same occurs if I try to ping the XP from the CentOs guest. From the windows XP guest I can ping both the host and the CentOs guest. From the XP guest I can access the host shares. Obviously, from the host I cannot see the XP shares (as I cannot even ping the guest). I want to maintain this setup (using NAT to share the host's internet connection). Any suggestions?

    Read the article

  • Shuffling in windows media player

    - by Crazy Buddy
    I think media player has several issues indeed. You see, I'll be hearing songs most of the time using WMP 11 (in WinXP SP3). Today - While I was wasting my time poking some sleepy questions in SE, I also noticed this... My "Now-playing" list contains some 500 mp3s (doesn't matter). I've enabled both Shuffle and Repeat. I play those songs. When I get irritated with some song (say - the 10th song), I change it. Something mysterious happened (happens even now). A sequence of atleast 3 songs (already played before the 10th song) repeat again in the same way following the selected one... Then, I skip those somehow and arrive at another boring song (say now - 20th) and now, the sequence would've increased by about 5 songs (sometimes)... Sometimes, I even notice a specific "sequence of songs" (including the skipped one) repeating again & again. I doubt most guys would've noticed. This makes me ask a question - Why? There are a lot songs in my playlist. Why the same sets of songs? Does WMP really chooses a sequence at start and follows it. Once a change is encountered, it starts the sequence again after several songs. Is it so? Feel free to shoot it down. I don't know whether it's acceptable here. Just curious about it... Note: This is only observed when both shuffle and repeat are enabled. To confirm, I tried it in two other PCs of mine (thereby dumped 2 hours). BTW, I also didn't observe this magic in VLC, Winamp, K-Lite and not even my Nokia cellphone. I think I'm not a good Googler and so, I can't find any such issues :-)

    Read the article

  • How to use Zune software to listen to podcasts with generic MP3 player?

    - by Bevan
    I listen to a bunch of podcasts - a great way to fill the otherwise mindless space of a daily commute. My MP3 player is a Transonic brand, appears on my computer as a generic storage device. I've been using iTunes to download the podcasts, and manually moving the files out of the disk folder onto my player, but this is pretty tedious. iTunes also fails to recognise that the files are gone and leaves them in the list. (Actually, iTunes for windows is pretty much a dog, but that's a different rant.) The Zune software is 99% of what I want in a podcast downloader - performs well, looks nice, downloads reliably and so on. Some features - like only downloading the next five unheard episodes of a podcast - are superb. However, if I manually move the files across to the MP3 player, the Zune software concludes that the file has never been downloaded, and downloads it again. This leads me to my question: What is a good way to use the Zune software to download podcasts for listening on a generic MP3 player? Are there any addons for the Zune software to make this easier? Registry hacks? Can I configure the Zune software to not download the same episode multiple times? Is there a way for the Zune software to populate my MP3 player directly, instead of having to copy files?

    Read the article

  • VMware Player loses internet connectivity

    - by Martha
    Periodically, the internet simply stops working in my virtual machine, and the only way I can get it working again is to restart the host computer. Since I use the virtual machine specifically for testing web pages, this is, shall we say, a bother. Details: I have Windows XP Pro running in VMware Player (v. 3.0.0 build-203739) on a Windows 7 host. It's set to NAT (shared IP address) because the firewall won't allow a bridged connection. Every couple of days or so, first the internet slows down to a crawl, then eventually it stops working altogether. Both VMWare and the virtual OS report that they are connected, everything looks just peachy, I can reach the internet from the host, but on the VM, all web pages time out and/or report that the server could not be found. (Browser-independent; tried with IE, FF, Chrome, Safari, and Opera.) When this happens, the only way I've found to restore the internet connectivity is to restart the host machine. Restarting the VM doesn't help, nor does refreshing network connections on either the host or the guest. (Although I'm not entirely sure I've found the proper way to refresh a network connection in Windows 7...) I have not noticed any predictability about when the problem occurs, i.e. it's not immediately after I do anything special. It seems to occur mostly after putting the host to sleep once or twice, but it has happened even if the host has been in continuous use. It also seems independent of when I start using the VM - sometimes, I wake up the VM and the internet is really slow in it, then eventually stops working altogether; other times, I wake up the VM, use it perfectly happily for a while, then suddenly the internet is gone. Does anyone know why this is occurring? Failing that, is there a workaround that's less drastic than restarting the host? (Windows 7 startup times are blazingly fast compared to previous versions of Windows, but it's still a hassle to close all my programs and reopen them again.) Edit: while badges overall are nice, the Tumbleweed badge isn't helping me to solve my problem. Hasn't anyone encountered anything even remotely similar?

    Read the article

  • Check "Id3 Tag" integrity from mp3 (almost a "debug"). Is it possible?

    - by Somebody still uses you MS-DOS
    I'm using Mp3Tag do edit Id3 tags in my mp3 files. In the editor everything looks ok, but in my iTunes, some of them just ge messed up. The artist isn't read, Album Artist doesn't show up, this kind of thing. It's just random, some are messed up, some aren't. How do I "debug" this problem? How can I check what is written in my mp3 metadata, if possible, running all my mp3 in a batch (since I have 100gb)? How do I know if there are "garbage" in the metadata section along with information I correctly edited?

    Read the article

  • Collision Detection on floor tiles Isometric game

    - by Anivrom
    I am having a very hard to time figuring out a bug in my code. It should have taken me 20 minutes but instead I've been working on it for over 12 hours. I am writing a isometric tile based game where the characters can walk freely amongst the tiles, but not be able to cross over to certain tiles that have a collides flag. Sounds easy enough, just check ahead of where the player is going to move using a Screen Coordinates to Tile method and check the tiles array using our returned xy indexes to see if its collidable or not. if its not, then don't move the character. The problem I'm having is my Screen to Tile method isn't spitting out the proper X,Y tile indexes. This method works flawlessly for selecting tiles with the mouse. NOTE: My X tiles go from left to right, and my Y tiles go from up to down. Reversed from some examples on the net. Here's the relevant code: public Vector2 ScreentoTile(Vector2 screenPoint) { //Vector2 is just a object with x and y float properties //camOffsetX,Y are my camera values that I use to shift everything but the //current camera target when the target moves //tilescale = 128, screenheight = 480, the -46 offset is to center // vertically + 16 px for some extra gfx in my tile png Vector2 tileIndex = new Vector2(-1,-1); screenPoint.x -= camOffsetX; screenPoint.y = screenHeight - screenPoint.y - camOffsetY - 46; tileIndex.x = (screenPoint.x / tileScale) + (screenPoint.y / (tileScale / 2)); tileIndex.y = (screenPoint.x / tileScale) - (screenPoint.y / (tileScale / 2)); return tileIndex; } The method that calls this code is: private void checkTileTouched () { if (Gdx.input.justTouched()) { if (last.x >= 0 && last.x < levelWidth && last.y >= 0 && last.y < levelHeight) { if (lastSelectedTile != null) lastSelectedTile.setColor(1, 1, 1, 1); Sprite sprite = levelTiles[(int) last.x][(int) last.y].sprite; sprite.setColor(0, 0.3f, 0, 1); lastSelectedTile = sprite; } } if (touchDown) { float moveX=0,moveY=0; Vector2 pos = new Vector2(); if (player.direction == direction_left) { moveX = -(player.moveSpeed); moveY = -(player.moveSpeed / 2); Gdx.app.log("Movement", String.valueOf("left")); } else if (player.direction == direction_upleft) { moveX = -(player.moveSpeed); moveY = 0; Gdx.app.log("Movement", String.valueOf("upleft")); } else if (player.direction == direction_up) { moveX = -(player.moveSpeed); moveY = player.moveSpeed / 2; Gdx.app.log("Movement", String.valueOf("up")); } else if (player.direction == direction_upright) { moveX = 0; moveY = player.moveSpeed; Gdx.app.log("Movement", String.valueOf("upright")); } else if (player.direction == direction_right) { moveX = player.moveSpeed; moveY = player.moveSpeed / 2; Gdx.app.log("Movement", String.valueOf("right")); } else if (player.direction == direction_downright) { moveX = player.moveSpeed; moveY = 0; Gdx.app.log("Movement", String.valueOf("downright")); } else if (player.direction == direction_down) { moveX = player.moveSpeed; moveY = -(player.moveSpeed / 2); Gdx.app.log("Movement", String.valueOf("down")); } else if (player.direction == direction_downleft) { moveX = 0; moveY = -(player.moveSpeed); Gdx.app.log("Movement", String.valueOf("downleft")); } //Player.moveSpeed is 1 //tileObjects.x is drawn in the center of the screen (400px,240px) // the sprite width is 64, height is 128 testX = moveX * 10; testY = moveY * 10; testX += tileObjects.get(player.zIndex).x + tileObjects.get(player.zIndex).sprite.getWidth() / 2; testY += tileObjects.get(player.zIndex).y + tileObjects.get(player.zIndex).sprite.getHeight() / 2; moveX += tileObjects.get(player.zIndex).x + tileObjects.get(player.zIndex).sprite.getWidth() / 2; moveY += tileObjects.get(player.zIndex).y + tileObjects.get(player.zIndex).sprite.getHeight() / 2; pos = ScreentoTile(new Vector2(moveX,moveY)); Vector2 pos2 = ScreentoTile(new Vector2(testX,testY)); if (!levelTiles[(int) pos2.x][(int) pos2.y].collides) { Vector2 newPlayerPos = ScreentoTile(new Vector2(moveX,moveY)); CenterOnCoord(moveX,moveY); player.tileX = (int)newPlayerPos.x; player.tileY = (int)newPlayerPos.y; } } } When the player is moving to the left (downleft-ish from the viewers point of view), my Pos2 X values decrease as expected but pos2 isnt checking ahead on the x tiles, it is checking ahead on the Y tiles(as if we were moving DOWN, not left), and vice versa, if the player moves down, it will check ahead on the X values (as if we are moving LEFT, instead of DOWN). instead of the Y values. I understand this is probably the most confusing and horribly written post ever, but I'm confused myself so I'm having a hard time explaining it to others lol. if you need more information please ask!! I'm so frustrated after over 12 hours of working on it I'm about to give up.

    Read the article

  • What is the best way to merge mp3 files?

    - by Dan Williams
    I've got many, many mp3 files that I would like to merge into a single file. I've used the command line method copy /b 1.mp3+2.mp3 3.mp3 but it's a pain when there's a lot of them and their namings are inconsistent. The time never seems to come out right either.

    Read the article

  • Should I make the Cells in a Tiledmap as null when my player hits it

    - by Vishal Kumar
    I am making a Tile Based game using Libgdx. I took the idea from SuperKoalio platformer demo by Mario Zencher. When I wanted to implement Collectables in my game , I simply draw the coins using Tiled Map Editor. When my player hits that, I use to set that cell as null. Someday on this site suggested me not to do so... never use null. I agreed. What can be any other way. If I am using layer.setCell(x,y) to set the cell to any other cell... even if an transparent one .. my player seems to be stopped by an invisible object/hurdle. This is my code: for (Rectangle tile : tiles) { if (koalaRect.overlaps(tile)) { TiledMapTileLayer layer = (TiledMapTileLayer) map.getLayers().get(1); try{ type = layer.getCell((int) tile.x, (int) tile.y).getTile().getProperties().get("tileType").toString(); } catch(Exception e){ System.out.print("Exception in Tiles Property"+e); type="nonbreakable"; } //Let us destroy this cell if(("award".equals(type))){ layer.setCell((int) tile.x, (int) tile.y, null); listener.coin(); score+=100; test = ""+layer.getCell(0, 0).getTile().getProperties().get("tileType"); } //DOING THIS GIVES A BAD EFFECT if(("killer".equals(type))){ //player.health--; //layer.setCell((int) tile.x, (int) tile.y, layer.getCell(20,0)); } // we actually reset the player y-position here // so it is just below/above the tile we collided with // this removes bouncing :) if (player.velocity.y > 0) { player.position.y = (tile.y - Player.height); } Is this a right approach? OR I should create separate Sprite Class called Coin.

    Read the article

  • Streamed mp3 only plays for 1 second

    - by angel6
    Hi, I'm using the plaympeg.c (modified) code of smpeg as a media player. I've got ffserver running as a streaming server. I'm a streaming an mp3 file over http. But when I run plaympeg.c, it plays the streamed file only for a second. When I run plaympeg again, it starts off from where it left and plays for 1 second. Does anyone know why this happens an how to fix it? I've tested it out on WMP and it plays the entire file in one go. So, i guess it's not a problem with the streaming or ffserver.conf include include include include /* #ifdef unix */ include include include include include include include define NET_SUPPORT /* General network support */ define HTTP_SUPPORT /* HTTP support */ ifdef NET_SUPPORT include include include include endif include "smpeg.h" ifdef NET_SUPPORT int tcp_open(char * address, int port) { struct sockaddr_in stAddr; struct hostent * host; int sock; struct linger l; memset(&stAddr,0,sizeof(stAddr)); stAddr.sin_family = AF_INET ; stAddr.sin_port = htons(port); if((host = gethostbyname(address)) == NULL) return(0); stAddr.sin_addr = *((struct in_addr *) host-h_addr_list[0]) ; if((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) return(0); l.l_onoff = 1; l.l_linger = 5; if(setsockopt(sock, SOL_SOCKET, SO_LINGER, (char*) &l, sizeof(l)) < 0) return(0); if(connect(sock, (struct sockaddr *) &stAddr, sizeof(stAddr)) < 0) return(0); return(sock); } ifdef HTTP_SUPPORT int http_open(char * arg) { char * host; int port; char * request; int tcp_sock; char http_request[1024]; char c; printf("\nin http_open passed parameter = %s\n",arg); /* Check for URL syntax */ if(strncmp(arg, "http://", strlen("http://"))) return(0); /* Parse URL */ port = 80; host = arg + strlen("http://"); if((request = strchr(host, '/')) == NULL) return(0); request++ = 0; if(strchr(host, ':') != NULL) / port is specified */ { port = atoi(strchr(host, ':') + 1); *strchr(host, ':') = 0; } /* Open a TCP socket */ if(!(tcp_sock = tcp_open(host, port))) { perror("http_open"); return(0); } /* Send HTTP GET request */ sprintf(http_request, "GET /%s HTTP/1.0\r\n" "User-Agent: Mozilla/2.0 (Win95; I)\r\n" "Pragma: no-cache\r\n" "Host: %s\r\n" "Accept: /\r\n" "\r\n", request, host); send(tcp_sock, http_request, strlen(http_request), 0); /* Parse server reply */ do read(tcp_sock, &c, sizeof(char)); while(c != ' '); read(tcp_sock, http_request, 4*sizeof(char)); http_request[4] = 0; if(strcmp(http_request, "200 ")) { fprintf(stderr, "http_open: "); do { read(tcp_sock, &c, sizeof(char)); fprintf(stderr, "%c", c); } while(c != '\r'); fprintf(stderr, "\n"); return(0); } return(tcp_sock); } endif endif void update(SDL_Surface *screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h) { if ( screen-flags & SDL_DOUBLEBUF ) { SDL_Flip(screen); } } /* Flag telling the UI that the movie or song should be skipped */ int done; void next_movie(int sig) { done = 1; } int main(int argc, char *argv[]) { int use_audio, use_video; int fullscreen; int scalesize; int scale_width, scale_height; int loop_play; int i, pause; int volume; Uint32 seek; float skip; int bilinear_filtering; SDL_Surface *screen; SMPEG *mpeg; SMPEG_Info info; char *basefile; SDL_version sdlver; SMPEG_version smpegver; int fd; char buf[32]; int status; printf("\nchecking command line options "); /* Get the command line options */ use_audio = 1; use_video = 1; fullscreen = 0; scalesize = 1; scale_width = 0; scale_height = 0; loop_play = 0; volume = 100; seek = 0; skip = 0; bilinear_filtering = 0; fd = 0; for ( i=1; argv[i] && (argv[i][0] == '-') && (argv[i][1] != 0); ++i ) { if ( strcmp(argv[i], "--fullscreen") == 0 ) { fullscreen = 1; } else if ((strcmp(argv[i], "--seek") == 0)||(strcmp(argv[i], "-S") == 0)) { ++i; if ( argv[i] ) { seek = atol(argv[i]); } } else if ((strcmp(argv[i], "--volume") == 0)||(strcmp(argv[i], "-v") == 0)) { ++i; if (i >= argc) { fprintf(stderr, "Please specify volume when using --volume or -v\n"); return(1); } if ( argv[i] ) { volume = atoi(argv[i]); } if ( ( volume < 0 ) || ( volume 100 ) ) { fprintf(stderr, "Volume must be between 0 and 100\n"); volume = 100; } } else { fprintf(stderr, "Warning: Unknown option: %s\n", argv[i]); } } printf("\nuse video = %d, use audio = %d\n",use_video, use_audio); printf("\ngoing to check input parameters\n"); if defined(linux) || defined(FreeBSD) /* Plaympeg doesn't need a mouse */ putenv("SDL_NOMOUSE=1"); endif /* Play the mpeg files! */ status = 0; for ( ; argv[i]; ++i ) { /* Initialize SDL */ if ( use_video ) { if ((SDL_Init(SDL_INIT_VIDEO) < 0) || !SDL_VideoDriverName(buf, 1)) { fprintf(stderr, "Warning: Couldn't init SDL video: %s\n", SDL_GetError()); fprintf(stderr, "Will ignore video stream\n"); use_video = 0; } printf("\ninitialised video\n"); } if ( use_audio ) { if ((SDL_Init(SDL_INIT_AUDIO) < 0) || !SDL_AudioDriverName(buf, 1)) { fprintf(stderr, "Warning: Couldn't init SDL audio: %s\n", SDL_GetError()); fprintf(stderr, "Will ignore audio stream\n"); use_audio = 0; } } /* Allow Ctrl-C when there's no video output */ signal(SIGINT, next_movie); printf("\nchecking defined supports\n"); /* Create the MPEG stream */ ifdef NET_SUPPORT printf("\ndefined NET_SUPPORT\n"); ifdef HTTP_SUPPORT printf("\ndefined HTTP_SUPPORT\n"); /* Check if source is an http URL */ printf("\nabout to call http_open\n"); printf("\nhere we go\n"); if((fd = http_open(argv[i])) != 0) mpeg = SMPEG_new_descr(fd, &info, use_audio); else endif endif { if(strcmp(argv[i], "-") == 0) /* Use stdin for input */ mpeg = SMPEG_new_descr(0, &info, use_audio); else mpeg = SMPEG_new(argv[i], &info, use_audio); } if ( SMPEG_error(mpeg) ) { fprintf(stderr, "%s: %s\n", argv[i], SMPEG_error(mpeg)); SMPEG_delete(mpeg); status = -1; continue; } SMPEG_enableaudio(mpeg, use_audio); SMPEG_enablevideo(mpeg, use_video); SMPEG_setvolume(mpeg, volume); /* Print information about the video */ basefile = strrchr(argv[i], '/'); if ( basefile ) { ++basefile; } else { basefile = argv[i]; } if ( info.has_audio && info.has_video ) { printf("%s: MPEG system stream (audio/video)\n", basefile); } else if ( info.has_audio ) { printf("%s: MPEG audio stream\n", basefile); } else if ( info.has_video ) { printf("%s: MPEG video stream\n", basefile); } if ( info.has_video ) { printf("\tVideo %dx%d resolution\n", info.width, info.height); } if ( info.has_audio ) { printf("\tAudio %s\n", info.audio_string); } if ( info.total_size ) { printf("\tSize: %d\n", info.total_size); } if ( info.total_time ) { printf("\tTotal time: %f\n", info.total_time); } /* Set up video display if needed */ if ( info.has_video && use_video ) { const SDL_VideoInfo *video_info; Uint32 video_flags; int video_bpp; int width, height; /* Get the "native" video mode */ video_info = SDL_GetVideoInfo(); switch (video_info->vfmt->BitsPerPixel) { case 16: case 24: case 32: video_bpp = video_info->vfmt->BitsPerPixel; break; default: video_bpp = 16; break; } if ( scale_width ) { width = scale_width; } else { width = info.width; } width *= scalesize; if ( scale_height ) { height = scale_height; } else { height = info.height; } height *= scalesize; video_flags = SDL_SWSURFACE; if ( fullscreen ) { video_flags = SDL_FULLSCREEN|SDL_DOUBLEBUF|SDL_HWSURFACE; } video_flags |= SDL_ASYNCBLIT; video_flags |= SDL_RESIZABLE; screen = SDL_SetVideoMode(width, height, video_bpp, video_flags); if ( screen == NULL ) { fprintf(stderr, "Unable to set %dx%d video mode: %s\n", width, height, SDL_GetError()); continue; } SDL_WM_SetCaption(argv[i], "plaympeg"); if ( screen->flags & SDL_FULLSCREEN ) { SDL_ShowCursor(0); } SMPEG_setdisplay(mpeg, screen, NULL, update); SMPEG_scaleXY(mpeg, screen->w, screen->h); } else { SDL_QuitSubSystem(SDL_INIT_VIDEO); } /* Set any special playback parameters */ if ( loop_play ) { SMPEG_loop(mpeg, 1); } /* Seek starting position */ if(seek) SMPEG_seek(mpeg, seek); /* Skip seconds to starting position */ if(skip) SMPEG_skip(mpeg, skip); /* Play it, and wait for playback to complete */ SMPEG_play(mpeg); done = 0; pause = 0; while ( ! done && ( pause || (SMPEG_status(mpeg) == SMPEG_PLAYING) ) ) { SDL_Event event; while ( use_video && SDL_PollEvent(&event) ) { switch (event.type) { case SDL_VIDEORESIZE: { SDL_Surface *old_screen = screen; SMPEG_pause(mpeg); screen = SDL_SetVideoMode(event.resize.w, event.resize.h, screen->format->BitsPerPixel, screen->flags); if ( old_screen != screen ) { SMPEG_setdisplay(mpeg, screen, NULL, update); } SMPEG_scaleXY(mpeg, screen-w, screen-h); SMPEG_pause(mpeg); } break; case SDL_KEYDOWN: if ( (event.key.keysym.sym == SDLK_ESCAPE) || (event.key.keysym.sym == SDLK_q) ) { // Quit done = 1; } else if ( event.key.keysym.sym == SDLK_RETURN ) { // toggle fullscreen if ( event.key.keysym.mod & KMOD_ALT ) { SDL_WM_ToggleFullScreen(screen); fullscreen = (screen-flags & SDL_FULLSCREEN); SDL_ShowCursor(!fullscreen); } } else if ( event.key.keysym.sym == SDLK_UP ) { // Volume up if ( volume < 100 ) { if ( event.key.keysym.mod & KMOD_SHIFT ) { // 10+ volume += 10; } else if ( event.key.keysym.mod & KMOD_CTRL ) { // 100+ volume = 100; } else { // 1+ volume++; } if ( volume 100 ) volume = 100; SMPEG_setvolume(mpeg, volume); } } else if ( event.key.keysym.sym == SDLK_DOWN ) { // Volume down if ( volume 0 ) { if ( event.key.keysym.mod & KMOD_SHIFT ) { volume -= 10; } else if ( event.key.keysym.mod & KMOD_CTRL ) { volume = 0; } else { volume--; } if ( volume < 0 ) volume = 0; SMPEG_setvolume(mpeg, volume); } } else if ( event.key.keysym.sym == SDLK_PAGEUP ) { // Full volume volume = 100; SMPEG_setvolume(mpeg, volume); } else if ( event.key.keysym.sym == SDLK_PAGEDOWN ) { // Volume off volume = 0; SMPEG_setvolume(mpeg, volume); } else if ( event.key.keysym.sym == SDLK_SPACE ) { // Toggle play / pause if ( SMPEG_status(mpeg) == SMPEG_PLAYING ) { SMPEG_pause(mpeg); pause = 1; } else { SMPEG_play(mpeg); pause = 0; } } else if ( event.key.keysym.sym == SDLK_RIGHT ) { // Forward if ( event.key.keysym.mod & KMOD_SHIFT ) { SMPEG_skip(mpeg, 100); } else if ( event.key.keysym.mod & KMOD_CTRL ) { SMPEG_skip(mpeg, 50); } else { SMPEG_skip(mpeg, 5); } } else if ( event.key.keysym.sym == SDLK_LEFT ) { // Reverse if ( event.key.keysym.mod & KMOD_SHIFT ) { } else if ( event.key.keysym.mod & KMOD_CTRL ) { } else { } } else if ( event.key.keysym.sym == SDLK_KP_MINUS ) { // Scale minus if ( scalesize > 1 ) { scalesize--; } } else if ( event.key.keysym.sym == SDLK_KP_PLUS ) { // Scale plus scalesize++; } else if ( event.key.keysym.sym == SDLK_f ) { // Toggle filtering on/off if ( bilinear_filtering ) { SMPEG_Filter *filter = SMPEGfilter_null(); filter = SMPEG_filter( mpeg, filter ); filter-destroy(filter); bilinear_filtering = 0; } else { SMPEG_Filter *filter = SMPEGfilter_bilinear(); filter = SMPEG_filter( mpeg, filter ); filter-destroy(filter); bilinear_filtering = 1; } } break; case SDL_QUIT: done = 1; break; default: break; } } SDL_Delay(1000/2); } SMPEG_delete(mpeg); } SDL_Quit(); if defined(HTTP_SUPPORT) if(fd) close(fd); endif return(status); }

    Read the article

  • How can I disable the automatic switch to "library" mode in Windows 7's Media Player 12?

    - by matthews
    Whenever I plug any USB device into my computer while running Windows Media Player 12 in Windows 7, it will automatically swtich the player from the Now Playing mode to Library mode. This is intended to faciliate syncing between Media Player and MP3 players, but it happens for any USB device. I'd like this to not happen since it's infuriating to see this take place while I'm watching something on a separate screen in Media Player just from plugging in a USB key. This has nothing to do with Windows autorun, and nothing to do with versions of Windows pre-7. And no, switching to some other video player is not an option; I've tried them all, none are as good as stock Media Player in 7.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >