playback

is there a clean way to play an mp3 sound in the compact framework 3.5

情到浓时终转凉″ 提交于 2019-11-27 18:52:24
问题 I use the p/invoke method to play wav sounds. There are ways of calling windows media player to play an mp3 sound, but its slow & cumbersome. Is there an easy way to play a short mp3 file? This is primarily for application prompting and audible cues when you are not looking at the screen and not music. Thanks! 回答1: CF Framework 3.5 now includes support for playing .WAV files: Namespace System.Media.SoundPlayer Short WAV files for cues and sound-effects might even play faster than MP3s since

Playing a video file from a server in Swift

大憨熊 提交于 2019-11-27 17:13:20
I'm trying to play a video from a server using Swift. I have imported MediaPlayer framework, here is my code: import UIKit import MediaPlayer class VideoViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() var url:NSURL = NSURL(string: "http://jplayer.org/video/m4v/Big_Buck_Bunny_Trailer.m4v") var moviePlayer = MPMoviePlayerController(contentURL: url) moviePlayer.view.frame = CGRect(x: 20, y: 100, width: 200, height: 150) self.view.addSubview(moviePlayer.view) moviePlayer.fullscreen = true moviePlayer.controlStyle = MPMovieControlStyle.Embedded } } I only get a

How to load and play a video in pygame

你离开我真会死。 提交于 2019-11-27 15:17:32
I'm having a problem. I want to load and play a video in pygame but it doesn't start. The only thing that I am seeing is a black screen. Here is my code: import pygame from pygame import display,movie pygame.init() screen = pygame.display.set_mode((1024, 768)) background = pygame.Surface((1024, 768)) screen.blit(background, (0, 0)) pygame.display.update() movie = pygame.movie.Movie('C:\Python27\1.mpg') mrect = pygame.Rect(0,0,140,113) movie.set_display(screen, mrect.move(65, 150)) movie.set_volume(0) movie.play() Can you help me?? You are not actually blitting it to a screen. You are also not

Background music Android

浪尽此生 提交于 2019-11-27 12:56:28
Okey, this is my problem. I have one service class where Ive managed to create media player to play music in background all time. Here is code: package com.test.brzoracunanje; import android.app.Service; import android.content.Intent; import android.media.MediaPlayer; import android.os.IBinder; public class BackgroundSoundService extends Service { private static final String TAG = null; MediaPlayer player; public IBinder onBind(Intent arg0) { return null; } @Override public void onCreate() { // TODO Auto-generated method stub super.onCreate(); player = MediaPlayer.create(this, R.raw.test_cbr);

How can I know users click fast forward and fast rewind buttons on the playback controls in iPhone

纵饮孤独 提交于 2019-11-27 11:51:33
I want to implement the following things, App is running a music or video (using MPMoviePlayerController ) in background. User double clicks the home button and go to the first screen showing playback controls (fast rewind, play or pause, fast forward buttons) User click fast rewind or fast forward button. Then app play previous or next music or video. For the 3rd step, I should know which button is clicked. (As I naturally know, the currently playing item is paused, stopped.. using MPMoviePlayerPlaybackStateDidChangeNotification notification). Which notification should I register? Or are

Android video streaming example [closed]

半腔热情 提交于 2019-11-27 09:05:17
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I want to implement video streaming in my project. So, is there any tutorial that works? Videos are stored at server side. So, to

Android not playing Video .mp4

隐身守侯 提交于 2019-11-27 06:20:48
问题 hi guys i have prepared a code to just play a simple mp4 file from my res folder... The coding is something like this... public class VideoPlayer extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.video); VideoView video = (VideoView)findViewById(R.id.VideoView); Uri uri = Uri.parse("android.resource://company.software.myapp/" + R.raw.myvideo); MediaController mc = new MediaController(this); video

javascript pitch shift with time stretch

霸气de小男生 提交于 2019-11-27 06:13:01
问题 I'm a beginner learning javascript. I've got various projects in mind with an interactive page on my site related to microtonal frequencies and planetary frequencies. I need to be able to play my audio sample .wav file in a loop but have the audio sample timestretched with a corresponding change in pitch. I tried myAudio.playbackRate = 0.5; which plays the audio 0.5 slower but keeps pitch same. I researched and found something. But how do i set preservesPitch to false or true? And this only

C# How to programatically change the playback device

…衆ロ難τιáo~ 提交于 2019-11-27 03:26:37
问题 How can I programatically change the default audio device on a vista / win 7 system? Using C# or a Win API call? 回答1: The WinMM API should provide the functionality that you request. You would use the DRVM_MAPPER_PREFERRED_SET message, which is sent with waveOutMessage() function. Documentation: http://msdn.microsoft.com/en-us/library/aa909789.aspx However, if you are trying to send the waveform sound out yourself, you should look at the WinMM.Net library. http://winmm.codeplex.com 来源: https:

Dynamically control HTML5 audio with JavaScript

烈酒焚心 提交于 2019-11-27 01:58:34
问题 I've got a gallery of sorts with 10 or so thumbnails that each represent one song. To control the playback of each, I've set a play button to fades in via jQuery. After some digging around Apple's Dev Center I found some native JavaScript to control audio. It works beautifully, but is written for control of one object at a time. What I'd like to do is rewrite it as one function that dynamically controls the playback/pause of the thumbnail you're selecting. Below is the code that I found..