Online music sales were up and piracy was down in 2012, a sign that legal streaming sites, such as Spotify and Pandora, are having a positive impact on the music industry, according to two new reports published this week.

Digital music sales jumped 9 percent worldwide and total recorded music revenues were up 0.3 percent to $16.5 billion in 2012, the first year revenues increased since 1999, according to the IFPI Digital Music Report 2013. According to a separate report published Tuesday by the NPD Group, the number of people using peer-to-peer programs to pirate music declined 17 percent in 2013—just 11 percent of Internet uses a peer-to-peer service to illegally download music. The total volume of illegally downloaded music fell 26 percent between 2011 and 2012.

"We're by no means out of the woods, but these are positive signs that streaming/subscriptions services are starting to convert pirates and that targeted enforcement (like the shutdown of [the peer-to-peer program] LimeWire) can really make a difference," says Cara Duckworth, a representative for the Recording Industry Association of America.

Spotify, the on-demand streaming service that launched in the United States in 2011, could be one reason behind the drop in piracy. The service has more than 20 million users worldwide; more than 5 million of them paying a monthly fee to remove ads from the service.

"These numbers are definitely encouraging. It helps hammer home the point that the modern music industry is truly an innovative, digital business. In the U.S., more than of half of our revenues now come from dozens of digital services. More than 5 billion downloads worldwide, 20 million subscribers," Duckworth says. "We're starting to rebound, and a healthier music business means great things for artists and fans."